描述:该 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 | 链 ID | String |
tokenPrecision | 币种精度 | String |
isBaseToken | 是否是主网代币 | Boolean |
coinAmount | 币种数量 | String |
currencyAmount | 币种数量美元价值 | String |
browserUrl | 币种 OKLink 网址 | 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"
}
]
}