Total Token Balances#
Retrieve the list of token balances for an address across multiple chains or specified chains. The balance query supports:
- Chain native tokens
- ERC20 tokens on EVM chains
- BRC-20, ARC-20, Runes, and SRC-20 tokens in the Bitcoin ecosystem
- Fractal Bitcoin chain's BRC-20 tokens
Additionally, this interface supports filtering out risky airdrop tokens.
Request Path#
GET https://www.okx.com/api/v5/wallet/asset/all-token-balances-by-address
Request Parameters#
Parameter | Type | Required | Description |
---|---|---|---|
address | String | Yes | Address |
chains | Array | Yes | When filtering the chains for querying asset details, multiple chains should be separated by commas (, ). A maximum of 50 chains is supported. |
filter | String | No | 0 : Filter out risk airdrop tokens 1 : Do not filter Default is to filter. |
Response Parameters#
Parameter | Type | Description |
---|---|---|
tokenAssets | Array | List of token balances |
>chainIndex | String | Unique identifier for the chain |
>tokenAddress | String | Contract address |
>address | String | Address |
>symbol | String | Token symbol |
>balance | String | Token balance |
>tokenPrice | String | Token unit value, priced in USD |
>tokenType | String | Token type: 1 : token 2 : inscription |
>transferAmount | String | The balance of BRC-20, FBRC-20, and other inscription assets that can be directly transferred or traded, commonly referred to as the transferable balance. |
>availableAmount | String | The amount of BRC-20, FBRC-20, and other inscription assets that need to complete the inscription process before they can be traded or transferred, usually referred to as the available balance or pending inscription balance. |
>isRiskToken | Boolean | true : flagged as a risk airdrop token false : not flagged |
Request Example#
shell
curl --location --request GET 'https://www.okx.com/api/v5/wallet/asset/all-token-balances-by-address?address=0x50c476a139aab23fdaf9bca12614cdd54a4244e3&chains=1&filter=1' \
--header 'Content-Type: application/json' \
--header 'OK-ACCESS-PROJECT: 86af********d1bc' \
--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#
200
{
"code": "0",
"msg": "success",
"data": [
{
"tokenAssets": [
{
"chainIndex": "1",
"tokenAddress": "0xf4d2888d29d722226fafa5d9b24f9164c092421e",
"address": "0x50c476a139aab23fdaf9bca12614cdd54a4244e3",
"symbol": "LOOKS",
"balance": "0.6908810093750312",
"tokenPrice": "0.035834243057603148",
"tokenType": "1",
"isRiskToken": false
},
{
"chainIndex": "1",
"tokenAddress": "0x6570ffe19da7e2b425329b157d9109b87f18304b",
"address": "0x50c476a139aab23fdaf9bca12614cdd54a4244e3",
"symbol": "UNM",
"balance": "0.00157",
"tokenPrice": "5.401009128680169",
"tokenType": "1",
"isRiskToken": false
},
{
"chainIndex": "1",
"tokenAddress": "0x67542502245eb5df64ef7ea776199ceb79401058",
"address": "0x50c476a139aab23fdaf9bca12614cdd54a4244e3",
"symbol": "$ UniswapLR.com @ 5.75",
"balance": "1000",
"tokenPrice": "0",
"tokenType": "1",
"isRiskToken": true
}
]
}
]
}