Wallet API

Add Token#

Before querying assets in the user wallet, you need to determine the balances of which tokens to query and use this interface to add them.

Request Path#

POST https://www.okx.com/api/v5/waas/wallet/asset/add-token

Request Parameters#

ParameterTypeRequiredDescription
accountIdStringNoUnique identifier of the user wallet account.

If this parameter presents: Add under the specified user wallet account
Not present: Add under the project (applies to all its user wallet accounts)
Note
Watch-only wallets do not support custom token additions and only display the range of tokens supported by the OKX WaaS service. See supported tokens.
chainIndexStringYesUnique identifier of the chain
tokenAddressStringYesToken contract address

Response Parameters#

None

Request Example#

shell
curl --location --request POST 'https://www.okx.com/api/v5/waas/wallet/asset/add-token' \
--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' \
--data-raw '{
    "accountId": "44486e05-3235-2f8e-5fe2-a8ab46217863",
    "chainIndex": "111",
    "tokenAddress": "0xdf54b6c6195ea4d948d03bfd818d365cf175cfc2"
}'

Response Example#

200
{
    "code": "0",
    "data": [],
    "msg": "success"
}