More resources

Add coins#

In addition to the existing supported coins, you can add custom coins in the projectId dimension. Once added, any wallet you create can check the specified coin balance.

Request URL#

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

Request parameters#

ParameterTypeRequiredDescription
coinsArrayYesArray of tokens to be added
> chainIdStringYesUnique identifier of the chain
> tokenAddressStringYesToken address

Response parameters#

ParameterTypeDescription
coinIdStringCoin unique identifier
chainIdStringChain unique identifier
decimalsStringCoin precision
tokenAddressStringToken contract address
logoUrlStringCoin logo
nameStringFull name of coin
symbolStringCoin abbreviation
delFlagBooleanWhether to delete

Request example#

shell
curl --location --request POST 'https://www.okx.com/api/v5/waas/asset/add-coin' \
--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 '{
  "coins":[
    {
      "chainId": "111"
      "tokenAddress": "0xdf54b6c6195ea4d948d03bfd818d365cf175cfc2"
    },
    {
      "chainId": "222"
      "tokenAddress": "0xdf444b6c6195ea4d948d04cfd818d365cf175cee3"
    }
  ]
}'

Response example#

200
{
  "code": 0,
  "data": [{
    "chainId": 1,
    "coinId": 1001028,
    "tokenAddress": "0x4fe5a177c42f3bca6049acf207ab5e863e1e1496",
    "name": "HarryPotterObamaSonic10Inu",
    "symbol": "HPOS10I",
    "logoUrl": "https://static.coinall.ltd/cdn/wallet/logo/icon_custom_default_H.png",
    "decimals": 8,
    "updateTime": 1699525015585
  }],
  "msg": ""
}