DeFi API
查询用户的余额列表

查询用户的余额列表#

描述:该 API 将提供用户的余额列表。

请求地址#

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

请求参数#

参数名称相关描述参数类型必传数据类型
chainId公链 ID请求体String
address用户钱包地址请求体String
tokenAddressList代币智能合约列表 (主网币合约地址需要提前约定)请求体Array[String]

响应参数#

参数名称相关描述数据类型
tokenSymbol币种标识String
tokenName币种名称String
tokenLogo币种 logo 网址String
tokenAddress币种合约地址String
network币种网络String
chainId链 IDString
tokenPrecision币种精度String
isBaseToken是否是主网代币Boolean
coinAmount币种数量String
currencyAmount币种数量美元价值String
browserUrl币种 OKLink 网址String

请求示例#

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

响应示例#

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