钱包 API
查询币种列表

查询币种列表#

列举已添加的币种。

请求路径#

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

请求参数#

ParameterTypeRequiredDescription
accountIdStringNo指定该参数:列举特定用户钱包账户下的自定义币种
不指定该参数:列举项目下全局的自定义币种
chainIndexStringNo链唯一标识,不指定则返回所有
limitStringNo每次查询多少条,默认值为 50,最大100
cursorStringNo游标位置,默认为第一个

响应参数#

ParameterTypeDescription
cursorString游标
tokensArray币种信息
>chainIndexString链唯一标识
>decimalsString币种精度
>tokenAddressString代币合约地址
>logoUrlString币种标识
>nameString币种全称
>symbolString币种简称

请求示例#

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'

响应示例#

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"
                }
            ]
        }
    ]
}