DeFi API
Query user’s balance list

Query user’s balance list#

Description: This API provides the user’s balance list.

Request URL#

POST https://www.okx.com/api/v5/defi/user/balance-list

Request Parameter#

Parameter nameDescriptionParameter typeRequiredData type
chainIdPublic chain IDRequest bodyYesString
addressUser wallet addressRequest bodyYesString
tokenAddressListList of token smart contractsRequest bodyYesArray[String]

Response parameter#

Parameter nameDescriptionData type
tokenSymbolToken symbolString
tokenNameToken nameString
tokenLogoToken logo URLString
tokenAddressToken contract addressString
networkToken networkString
chainIdChain IDString
tokenPrecisionToken precisionString
isBaseTokenWhether it is a base tokenBoolean
coinAmountToken quantityString
currencyAmountToken value in USDString
browserUrlToken OKlink URLString

Request example#

shell
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"
]
}'

Response example#

200
{
    "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"
}
    ]
}