更多资源

获取支持的币种#

返回当前支持的所有币种的信息,包括主链币 (如 ETH) 和链上发行的代币 (如 USDT) 。根据参数不同,分别返回默认支持的平台币和你自定义添加的币种。

请求地址#

GET https://www.okx.com/api/v5/waas/asset/get-all-coins

请求参数#

ParameterTypeRequiredDescription
typeStringYes币种请求方式
0: 平台币
1:自定义代币

响应参数#

ParameterTypeDescription
chainIdString链唯一标识
coinIdString币种唯一标识
decimalsString币种精度
logoUrlString币种标识
nameString币种全称
symbolString币种简称
tokenAddressString代币合约地址
updateTimeString币种信息更新时间(时间戳)

请求示例#

shell
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'

响应示例#

200
{
	"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": ""
}