Wallet API
Get Added Tokens

Get Added Tokens#

Query the tokens added for wallet account.

Request Path#

GET https://www.okx.com/api/v5/waas/wallet/asset/all-tokens

Request Parameters#

ParameterTypeRequiredDescription
accountIdStringNoIf this parameter presents: List the tokens added under specific wallet account
If not present: Delete tokens added globally under project
chainIndexStringNoUnique identifier of the chain. If not specified, returns all
limitStringNoNumber of entries per query, default is 50, maximum is 100
cursorStringNoCursor position, default is the first

Response Parameters#

ParameterTypeDescription
cursorStringCursor position
tokensArrayToken information
>chainIndexStringUnique identifier of the chain
>decimalsStringToken precision
>tokenAddressStringToken contract address
>logoUrlStringToken logo
>nameStringFull name of the token
>symbolStringAbbreviation of the token

Request Example#

shell
curl --location --request GET 'https://www.okx.com/api/v5/waas/wallet/asset/all-tokens?accountId=13886e05-1265-4b79-8ac3-b7ab46217655&chainIndex=1&limit=20&cursor=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": "",
    "data": [
        {
            "cursor": "20",
            "tokens": [
                {
                    "chainIndex": "3",
                    "decimals": "18",
                    "tokenAddress": "0xdf54b6c6195ea4d948d03bfd818d365cf175cfc2",
                    "logoUrl": "https://static.coinall.ltd/cdn/wallet/logo/okb.png",
                    "name": "OKB",
                    "symbol": "OKB"
                },
                {
                    "chainIndex": "3",
                    "decimals": "6",
                    "tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
                    "logoUrl": "https://static.coinall.ltd/cdn/wallet/logo/usdt.png",
                    "name": "Tether",
                    "symbol": "USDT"
                }
            ]
        }
    ]
}