更多资源
实时币价查询

实时币价查询#

批量查询币种的实时价格。

请求地址#

POST https://www.okx.com/api/v5/waas/coin/price-list

请求参数#

ParameterTypeRequiredDescription
tokenListArray<Object>查询列表
>chainIdString链唯一标识
>tokenAddressListArray<String>代币地址
timeString默认查询最近时间点的价格,也可以查询过去一个时间点的价格;Unix 时间戳的毫秒数格式,如 1597026383085

响应参数#

ParameterTypeDescription
chainIdString链唯一标识
symbolString代币标识
priceString代币价格
tokenAddressString代币地址
circulatingSupplyString流通量 (多链汇总,部分代币数据为空)
maxSupplyString最大供应量 (多链汇总,部分代币数据为空)
totalSupplyString总供应量(多链汇总,部分代币数据为空)
volume24hString24 小时交易额
marketCapString市值 (多链汇总,部分代币数据为空)
priceChangeRate24HString24 小时价格涨跌幅
priceChange24HString24 小时价格涨跌额
decimalsString币种精度
tokenStatusListList<String>币价状态,如果币价不存在异常,该字段为空
币价异常含义
Low liquidity:该代币在主流 DEX 中流动性较低
Disparity between sources:多数据源报价间差异较大
Abnormal fluctuation:异常波动,一般是指代币币价短时间内大幅上涨或下跌

请求示例#

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

响应示例#

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