Get Address Portfolio Overview#
Get overview data related to address PnL, including total realized and unrealized PnL, winning rate, Top3 PnL tokens, and buy and sell transaction statistics
Request Path#
GET https://web3.okx.com/api/v6/dex/market/portfolio/overview
Request Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| chainIndex | String | Yes | Unique identifier of the chain, pass the chain ID (e.g., 501 for Solana), only single-chain query is supported |
| walletAddress | String | Yes | Wallet address to query |
| timeFrame | String | Yes | Statistical range number for address transactions and PnL (1=1D, 2=3D, 3=7D, 4=1M, 5=3M) |
Response Parameters#
| Parameter | Type | Description |
|---|---|---|
| realizedPnlUsd | String | Realized PnL (USD) |
| top3PnlTokenSumUsd | String | Total PnL of Top 3 tokens (USD) |
| top3PnlTokenPercent | String | Top 3 tokens PnL percentage |
| topPnlTokenList | Array | Top 3 PnL token list |
| >tokenContractAddress | String | Token contract address |
| >tokenSymbol | String | Token symbol |
| >tokenPnLUsd | String | Token PnL (USD) |
| >tokenPnLPercent | String | Token PnL percentage |
| winRate | String | Win rate |
| tokenCountByPnlPercent | Object | Token count statistics categorized by PnL percentage |
| >over500Percent | String | Number of tokens with PnL over 500% |
| >zeroTo500Percent | String | Number of tokens with PnL between 0% and 500% |
| >zeroToMinus50Percent | String | Number of tokens with PnL between -50% and 0% |
| >overMinus50Percent | String | Number of tokens with PnL below -50% |
| buyTxCount | String | Number of buy transactions |
| buyTxVolume | String | Buy transaction volume |
| sellTxCount | String | Number of sell transactions |
| sellTxVolume | String | Sell transaction volume |
| avgBuyValueUsd | String | Average buy value (USD) |
| preferredMarketCap | String | Preferred market cap range |
| buysByMarketCap | Array | Buy statistics categorized by market cap |
| >marketCapRange | String | Market cap range |
| >buyCount | String | Buy count |
Request Example#
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'
Response Example#
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": ""
}