查询钱包账户已添加的币种。
GET https://www.okx.com/api/v5/wallet/asset/all-tokens
Parameter | Type | Required | Description |
---|---|---|---|
accountId | String | No | 指定该参数:列举特定钱包账户下的自定义币种 不指定该参数:列举项目下全局的自定义币种 |
chainIndex | String | No | 链唯一标识,不指定则返回所有 |
limit | String | No | 每次查询多少条,默认值为 50,最大 100 |
cursor | String | No | 游标位置,默认为第一个 |
Parameter | Type | Description |
---|---|---|
cursor | String | 游标 |
tokens | Array | 币种信息 |
>chainIndex | String | 链唯一标识 |
>decimals | String | 币种精度 |
>tokenAddress | String | 代币合约地址 |
>logoUrl | String | 币种标识 |
>name | String | 币种全称 |
>symbol | String | 币种简称 |
curl --location --request GET 'https://www.okx.com/api/v5/wallet/asset/all-tokens?accountId=13886e05-1265-4b79-8ac3-b7ab46217655&chainIndex=3&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'
{
"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"
}
]
}
]
}