Description: This API provides the user’s balance list.
POST https://www.okx.com/api/v5/defi/user/balance-list
Parameter name | Description | Parameter type | Required | Data type |
---|---|---|---|---|
chainId | Public chain ID | Request body | Yes | String |
address | User wallet address | Request body | Yes | String |
tokenAddressList | List of token smart contracts | Request body | Yes | Array[String] |
Parameter name | Description | Data type |
---|---|---|
tokenSymbol | Token symbol | String |
tokenName | Token name | String |
tokenLogo | Token logo URL | String |
tokenAddress | Token contract address | String |
network | Token network | String |
chainId | Chain ID | String |
tokenPrecision | Token precision | String |
isBaseToken | Whether it is a base token | Boolean |
coinAmount | Token quantity | String |
currencyAmount | Token value in USD | String |
browserUrl | Token OKlink URL | String |
curl --location 'https://www.okx.com/api/v5/defi/user/balance-list' \
--header 'OK-ACCESS-KEY: 9c****77' \
--header 'OK-ACCESS-PASSPHRASE: p****d' \
--header 'Content-Type: application/json' \
--data '{
"chainId": "1",
"address": "0xa0****48",
"tokenAddressList": [
"0x6b175474e89094c44da98b954eedeac495271d0f",
"0xdac17f958d2ee523a2206206994597c13d831ec7"
]
}'
{
"code": 0,
"msg": "",
"data": [
{
"tokenSymbol": "DAI",
"tokenName": "Dai Stablecoin",
"tokenLogo": "https://static.coinall.ltd/cdn/wallet/logo/icon_custom_default_D.png",
"tokenAddress": "0x6b175474e89094c44da98b954eedeac495271d0f",
"network": "ETH",
"chainId": "1",
"tokenPrecision": "18",
"isBaseToken": false,
"coinAmount": "4.309755677978655097",
"currencyAmount": "4.310735082243589184287938931547",
"browserUrl": "https://www.oklink.com/eth/token/0x6b175474e89094c44da98b954eedeac495271d0f"
},
{
"tokenSymbol": "USDT",
"tokenName": "Tether USD",
"tokenLogo": "https://static.coinall.ltd/cdn/wallet/logo/icon_custom_default_U.png",
"tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"network": "ETH",
"chainId": "1",
"tokenPrecision": "6",
"isBaseToken": false,
"coinAmount": "43.628705",
"currencyAmount": "43.644922800365259359125",
"browserUrl": "https://www.oklink.com/eth/token/0xdac17f958d2ee523a2206206994597c13d831ec7"
}
]
}