获取地址画像概览信息#
获取地址收益相关的概览数据,包括实现及未实现收益总数、胜率、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 收益代币列表 |
| topPnlTokenList > tokenContractAddress | String | 代币合约地址 |
| topPnlTokenList > tokenSymbol | String | 代币符号 |
| topPnlTokenList > tokenPnLUsd | String | 代币收益(USD) |
| topPnlTokenList > tokenPnLPercent | String | 代币收益百分比 |
| winRate | String | 胜率 |
| tokenCountByPnlPercent | Object | 按收益率分类的代币数量统计 |
| tokenCountByPnlPercent > over500Percent | String | 收益率超过 500% 的代币数 |
| tokenCountByPnlPercent > zeroTo500Percent | String | 收益率在 0%~500% 之间的代币数 |
| tokenCountByPnlPercent > zeroToMinus50Percent | String | 收益率在 -50%~0% 之间的代币数 |
| tokenCountByPnlPercent > overMinus50Percent | String | 收益率低于 -50% 的代币数 |
| buyTxCount | String | 买入交易笔数 |
| buyTxVolume | String | 买入交易量 |
| sellTxCount | String | 卖出交易笔数 |
| sellTxVolume | String | 卖出交易量 |
| avgBuyValueUsd | String | 平均买入价值(USD) |
| preferredMarketCap | String | 偏好市值范围 |
| buysByMarketCap | Array | 按市值分类的买入统计 |
| buysByMarketCap > marketCapRange | String | 市值范围 |
| buysByMarketCap > 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": {
"realizedPnlUsd": "1500.00",
"top3PnlTokenSumUsd": "1200.00",
"top3PnlTokenPercent": "12.00",
"topPnlTokenList": [
{
"tokenContractAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"tokenSymbol": "USDT",
"tokenPnLUsd": "500.00",
"tokenPnLPercent": "5.00"
}
],
"winRate": "0.65",
"tokenCountByPnlPercent": {
"over500Percent": "2",
"zeroTo500Percent": "10",
"zeroToMinus50Percent": "3",
"overMinus50Percent": "1"
},
"buyTxCount": "50",
"buyTxVolume": "10000.00",
"sellTxCount": "45",
"sellTxVolume": "11500.00",
"avgBuyValueUsd": "200.00",
"preferredMarketCap": "Large",
"buysByMarketCap": [
{
"marketCapRange": "Large",
"buyCount": "30"
},
{
"marketCapRange": "Mid",
"buyCount": "15"
},
{
"marketCapRange": "Small",
"buyCount": "5"
}
]
},
"msg": ""
}