Wallet API
Get Watch-Only Wallet Token Balances

Get Watch-Only Wallet Token Balances#

Query the token balance list of multiple chains or specified chains held by the watch-only wallet.

Note
For watch-only wallet, we only support balance check for tokens listed in supported tokens. For other token addition needs, please contact us.

Request Path#

GET https://www.okx.com/api/waas/wallet/asset/all-token-balances-watch-only

Request Parameters#

ParameterTypeRequiredDescription
accountIdStringYesUnique identifier of the account.
chainsArrayNoList of chainIndex, can filter the token display by chain dimension. The maximum number of elements in the list is 20.

Response Parameters#

ParameterTypeDescription
chainIndexStringUnique identifier of the chain
tokenAddressStringContract address
symbolStringAbbreviation of the token
balanceStringBalance of the token
tokenPriceStringPrice of the token (usd)
tokenTypeStringToken type:
1: token
2: inscription
3: LP token

Request Example#

shell
curl --location --request GET 'https://www.okx.com/api/v5/waas/wallet/asset/all-token-balances-watch-only?accountId=44486e05-3235-2f8e-5fe2-a8ab46217863&chains=1,2' \
--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",
    "data": [
        {
            "chainIndex": "1",
            "tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
            "symbol": "USDT",
            "balance": "0.688467",
            "tokenPrice": "0.99993",
            "tokenType": "1"
        },
        {
            "chainIndex": "1",
            "tokenAddress": "0x514910771af9ca656af840dff83e8264ecf986ca",
            "symbol": "LINK",
            "balance": "0.000000366257612925",
            "tokenPrice": "14.108071299717093",
            "tokenType": "1"
        }
    ],
    "msg": "success"
}