批量查询币种的实时价格。
POST https://www.okx.com/api/v5/waas/coin/price-list
Parameter | Type | Required | Description |
---|---|---|---|
tokenList | Array<Object> | 是 | 查询列表 |
>chainId | String | 是 | 链唯一标识 |
>tokenAddressList | Array<String> | 是 | 代币地址 |
time | String | 否 | 默认查询最近时间点的价格,也可以查询过去一个时间点的价格;Unix 时间戳的毫秒数格式,如 1597026383085 |
Parameter | Type | Description |
---|---|---|
chainId | String | 链唯一标识 |
symbol | String | 代币标识 |
price | String | 代币价格 |
tokenAddress | String | 代币地址 |
circulatingSupply | String | 流通量 (多链汇总,部分代币数据为空) |
maxSupply | String | 最大供应量 (多链汇总,部分代币数据为空) |
totalSupply | String | 总供应量(多链汇总,部分代币数据为空) |
volume24h | String | 24 小时交易额 |
marketCap | String | 市值 (多链汇总,部分代币数据为空) |
priceChangeRate24H | String | 24 小时价格涨跌幅 |
priceChange24H | String | 24 小时价格涨跌额 |
decimals | String | 币种精度 |
tokenStatusList | List<String> | 币价状态,如果币价不存在异常,该字段为空 币价异常含义 Low liquidity:该代币在主流 DEX 中流动性较低 Disparity between sources:多数据源报价间差异较大 Abnormal fluctuation:异常波动,一般是指代币币价短时间内大幅上涨或下跌 |
curl --location --request POST 'https://www.okx.com/api/v5/waas/coin/price-list' \
--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 '{
"tokenList":[
{
"chainId":1,
"tokenAddressList":["0xdac17f958d2ee523a2206206994597c13d831ec7"]
},
{
"chainId":56
}
]
}'
{
"code": "0",
"msg": "success",
"data": [
{
"chainId": "1",
"symbol": "usdt",
"price": "1.000145405432340",
"tokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"circulatingSupply": "84605973812.990000000000000",
"maxSupply": "",
"totalSupply": "",
"volume24h": "38817595045.301186000000000",
"marketCap": "84650814979.110000000000000",
"priceChangeRate24H": "-0.000039990000000",
"priceChange24H": "-0.000040000000000",
"decimals": "6",
"tokenStatusList": []
},
{
"chainId": "56",
"symbol": "bnb",
"price": "246.935112798767160",
"tokenAddress": "",
"circulatingSupply": "151703763.020000000000000",
"maxSupply": "200000000.000000000000000",
"totalSupply": "",
"volume24h": "283632981.281666040000000",
"marketCap": "34510982165.370000000000000",
"priceChangeRate24H": "0.012086000000000",
"priceChange24H": "2.959179336225160",
"decimals": "18",
"tokenStatusList": []
}
]
}