Skip to content

代幣基本信息

接口描述

取得指定代幣的基础信息,包括市场信息,鏈上基本信息,行情基本信息等。

使用场景

  • 适用于代幣的通用信息查询
  • 适用于取得代幣的完整信息,包括价格、市值、供应量等
  • 适用于取得 coinKey(调用鏈上資料接口的必要参数)

重要提示chainAddresses 数组中包含该代幣在不同区块鏈上的 coinKey,如需查询鏈上持倉地址、余额趋势等資料,需让用户选择目标链并缓存对应的 coinKey

資料更新频率:实时更新

請求URL

  • 方法POST
  • 路径/open/v1/vs-token/detail

积分消耗

  • 消耗积分1

前置条件

取得 vsTokenId

条件说明取得方式
已有 vsTokenId直接使用缓存的 vsTokenId,无需重复查询上下文自动提取
未有 vsTokenId调用 POST /vs-token/list 接口取得前置接口调用

請求参数

参数通过請求體(Body)以 JSON 格式传递。

参数名類型必需描述
vsTokenIdlong代幣 ID

回應欄位

仅展示 data 对象内的欄位结构:

欄位類型实际返回類型描述
vsTokenIdlongstring代幣 ID
namestringstring代幣名称
symbolstringstring代幣符号
oldSymbolstringstring改名前的 symbol
pricenumberstring当前价格 (USD)
highPricenumberstring歷史最高价 (USD)
lowPricenumberstring歷史最低价 (USD)
marketCapDominancenumberstring市值占比 (%)
volume24hnumberstring24H 交易量 (USD)
volumeChange24hnumberstring24H 交易量变化率 (%)
percentChange1hnumberstring1 小时涨跌幅 (%)
percentChange24hnumberstring24 小时涨跌幅 (%)
percentChange7dnumberstring7 天涨跌幅 (%)
percentChange30dnumberstring30 天涨跌幅 (%)
percentChange60dnumberstring60 天涨跌幅 (%)
percentChange90dnumberstring90 天涨跌幅 (%)
marketCapnumberstring市值 (USD)
totalSupplynumberstring总供应量
circulationSupplynumberstring流通量
maxSupplynumberstring最大供应量
costnumberstring鏈上持倉成本 (USD)
chainAddressesarrayarray各个鏈上信息
    contractAddressstringstring合约地址
    chainNamestringstring链名
    holderCountintegerstring持倉地址数
    transCountintegerstring交易笔数
    issueDatelonglong發行时间(毫秒时间戳)
    precisionstringstring精度
    totalSupplystringstring该鏈上供应量
    coinKeystringstring鏈上代幣識別(重要)

欄位业务含义

欄位业务含义使用建议
coinKey鏈上代幣唯一識別调用鏈上資料接口(持倉地址、余额趋势等)的必要参数,格式为「链名_合约地址」,如 BTC_BTCeth_0x...
chainAddresses多链信息列表同一代幣可能在多个鏈上發行,需让用户选择目标链后缓存对应的 coinKey
cost鏈上主力成本根据鏈上大额交易計算的平均持倉成本

請求示例

json
{
    "vsTokenId": 1      // 代幣 id
}

cURL 示例(Linux/macOS)

bash
curl --location --request POST 'http://${host}/api/open/v1/vs-token/detail' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: xxxxx' \
--header 'X-TIMESTAMP: xxxxx' \
--header 'X-SIGN: xxxxx' \
--header 'Accept: */*' \
--data-raw '{
    "vsTokenId": 1
}'

cURL 示例(Windows CMD)

cmd
curl --location --request POST "http://${host}/api/open/v1/vs-token/detail" ^
--header "Content-Type: application/json" ^
--header "X-API-KEY: xxxxx" ^
--header "X-TIMESTAMP: xxxxx" ^
--header "X-SIGN: xxxxx" ^
--header "Accept: */*" ^
--data-raw "{    \"vsTokenId\": 1}"

成功回應示例

json
{
    "code": 200,
    "message": "success",
    "data": {
        "vsTokenId": "1",                           // 代幣 ID
        "name": "Bitcoin",                           // 代幣名称
        "symbol": "BTC",                             // symbol
        "oldSymbol": "",                              // 改名前的 symbol
        "price": "70559.18",                          // 幣种价格
        "highPrice": "126198.06960343386",            // 最高幣价
        "lowPrice": "0.04864654",                     // 最低幣价
        "marketCapDominance": "",                      // 市值占比
        "volume24h": "54389029990.497185",            // 24H 交易量
        "volumeChange24h": "15.6056",                 // 24H 交易量变化率
        "percentChange1h": "-0.09167097",              // 幣价 1 小时变化量
        "percentChange24h": "-1.29235993",             // 幣价 24 小时变化量
        "percentChange7d": "3.96301796",               // 幣价 7 天变化量
        "percentChange30d": "5.35405481",              // 幣价 30 天变化量
        "percentChange60d": "-23.17390208",            // 幣价 60 天变化量
        "percentChange90d": "-21.71414845",            // 幣价 90 天变化量
        "marketCap": "1412725749093.2734",             // 市值
        "totalSupply": "20001887",                     // 供应量
        "circulationSupply": "20001887",               // 流通量
        "maxSupply": "21000000",                       // 最大供应量
        "cost": "60515.829728843657394618",            // 鏈上持倉成本
        "chainAddresses": [
            {
                "contractAddress": "BTC",               // 合约地址
                "chainName": "BTC",                     // 链名
                "holderCount": "55905596",              // 地址数
                "transCount": "1322741358",             // 交易笔数
                "issueDate": 1230998400000,             // 發行时间
                "precision": "8",                        // 精度
                "totalSupply": "20001892",               // 供应量
                "coinKey": "BTC_BTC"                     // coinKey
            }
        ]
    },
    "requestId": "xxx-xxx-xxx"
}