钱包 API
添加币种

添加币种#

使用钱包账户查询资产前,需要先确定查哪些代币的余额,并使用该接口进行添加。

请求路径#

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

请求参数#

ParameterTypeRequiredDescription
accountIdStringNo账户的唯一标识

指定该参数: 在指定钱包账户下添加
不指定该参数: 在项目下(为所有钱包账户)添加
chainIndexStringYes链唯一标识
tokenAddressStringYes代币合约地址

响应参数#

请求示例#

shell
curl --location --request POST 'https://www.okx.com/api/api/v5/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"
}'

响应示例#

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