返回当前支持的所有币种的信息,包括主链币 (如 ETH) 和链上发行的代币 (如 USDT) 。根据参数不同,分别返回默认支持的平台币和你自定义添加的币种。
GET https://www.okx.com/api/v5/waas/asset/get-all-coins
Parameter | Type | Required | Description |
---|---|---|---|
type | String | Yes | 币种请求方式 0: 平台币 1:自定义代币 |
Parameter | Type | Description |
---|---|---|
chainId | String | 链唯一标识 |
coinId | String | 币种唯一标识 |
decimals | String | 币种精度 |
logoUrl | String | 币种标识 |
name | String | 币种全称 |
symbol | String | 币种简称 |
tokenAddress | String | 代币合约地址 |
updateTime | String | 币种信息更新时间(时间戳) |
curl --location --request GET 'https://www.okx.com/api/v5/waas/asset/get-all-coins?type=0' \
--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",
"data": [{
"chainId": "1",
"coinId": "3",
"decimals": "18",
"logoUrl": "https://static.coinall.ltd/cdn/wallet/logo/ETH-20220328.png",
"name": "Ethereum",
"symbol": "ETH",
"tokenAddress": "",
"updateTime": "1543198579776"
},
{
"chainId": "61",
"coinId": "4",
"decimals": "18",
"logoUrl": "https://static.coinall.ltd/cdn/wallet/logo/ETC.png",
"name": "Ethereum Classic",
"symbol": "ETC",
"tokenAddress": "",
"updateTime": "1543198579776"
}
],
"msg": ""
}