获取地址画像概览信息#
获取地址收益相关的概览数据,包括实现及未实现收益总数、胜率、Top3收益代币、买入卖出交易统计
请求路径#
GET https://web3.okx.com/api/v6/dex/market/portfolio/overview
请求参数#
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| chainIndex | String | 是 | 链的唯一标识,传入链的 ID(如 501: Solana),仅支持单链查询 |
| walletAddress | String | 是 | 查询的钱包地址 |
| timeFrame | String | 是 | 地址交易及收益的统计范围编号(1=1D,2=3D,3=7D,4=1M,5=3M) |
响应参数#
| 参数 | 类型 | 说明 |
|---|---|---|
| realizedPnlUsd | String | 已实现盈亏(USD) |
| top3PnlTokenSumUsd | String | Top3 代币收益总额(USD) |
| top3PnlTokenPercent | String | Top3 代币收益百分比 |
| topPnlTokenList | Array | Top3 收益代币列表 |
| >tokenContractAddress | String | 代币合约地址 |
| >tokenSymbol | String | 代币符号 |
| >tokenPnLUsd | String | 代币收益(USD) |
| >tokenPnLPercent | String | 代币收益百分比 |
| winRate | String | 胜率 |
| tokenCountByPnlPercent | Object | 按收益率分类的代币数量统计 |
| >over500Percent | String | 收益率超过 500% 的代币数 |
| >zeroTo500Percent | String | 收益率在 0%~500% 之间的代币数 |
| >zeroToMinus50Percent | String | 收益率在 -50%~0% 之间的代币数 |
| >overMinus50Percent | String | 收益率低于 -50% 的代币数 |
| buyTxCount | String | 买入交易笔数 |
| buyTxVolume | String | 买入交易量 |
| sellTxCount | String | 卖出交易笔数 |
| sellTxVolume | String | 卖出交易量 |
| avgBuyValueUsd | String | 平均买入价值(USD) |
| preferredMarketCap | String | 偏好市值范围,首选市值:1: 小于$100K, 2: $100K-$1M, 3: $1M-$10M, 4: $10M-$100M, 5: 大于$100M |
| buysByMarketCap | Array | 按市值分类的买入统计 |
| >marketCapRange | String | 市值范围,市值范围指数包括:1: 小于$100K, 2: $100K-$1M, 3: $1M-$10M, 4: $10M-$100M, 5: 大于$100M |
| >buyCount | String | 买入次数 |
请求示例#
Shell
curl --location --request GET 'https://web3.okx.com/api/v6/dex/market/portfolio/overview?chainIndex=1&walletAddress=0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045&timeFrame=3' \
--header 'OK-ACCESS-KEY: 37c541a1-****-****-****-10fe7a038418' \
--header 'OK-ACCESS-SIGN: leaV********3uw=' \
--header 'OK-ACCESS-PASSPHRASE: 1****6' \
--header 'OK-ACCESS-TIMESTAMP: 2023-10-18T12:21:41.274Z'
响应示例#
Json
{
"code": "0",
"data": {
"avgBuyValueUsd": "0",
"buyTxCount": "0",
"buyTxVolume": "0",
"buysByMarketCap": [
{
"buyCount": "0",
"marketCapRange": "1"
},
{
"buyCount": "0",
"marketCapRange": "2"
},
{
"buyCount": "0",
"marketCapRange": "3"
},
{
"buyCount": "0",
"marketCapRange": "4"
},
{
"buyCount": "0",
"marketCapRange": "5"
}
],
"preferredMarketCap": "1",
"realizedPnlUsd": "0",
"sellTxCount": "4",
"sellTxVolume": "0",
"tokenCountByPnlPercent": {
"over500Percent": "0",
"overMinus50Percent": "0",
"zeroTo500Percent": "0",
"zeroToMinus50Percent": "0"
},
"top3PnlTokenPercent": "0",
"top3PnlTokenSumUsd": "0",
"topPnlTokenList": [],
"winRate": "0.00"
},
"msg": ""
}