Skip to content

实时资金积累

接口描述

取得指定代幣在中心化交易所交易產生的实时资金資料(即实时净流入資料),以及当日的主力资金积累資料,包括代幣的现货和合约交易。

使用场景

  • 适用于查看资金在当日不同时间点时,在不同时间窗口的积累情况監控
  • 适用于主力资金行为追踪

使用提示:

  • 查询日内主力资金时看24h(小时)内的净流入最大值,查询主力资金时看90d(天)内净流入最大值。
  • 净流入为正,表示表示主力流入,利多。净流入为负,表示主力賣出,利空
  • 自然语言查询主力资金(未指定交易類型)时需要提供现货和合约的资金資料
  • 自然语言查询主力分析、主力情况等综合语言需要调此接口

資料更新频率:每5分鐘更新一次

請求URL

  • 方法POST
  • 路径/open/v1/trade/getCoinTrade

积分消耗

  • 消耗积分3

前置条件

取得 vsTokenId

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

請求参数

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

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

回應欄位

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

欄位類型实际返回類型描述
updateTimelonglong更新时间(毫秒时间戳)
vsTokenIdlongstring代幣ID
symbolstringstring代幣符号
namestringstring代幣名称
hasSpotGoodsbooleanboolean是否存在现货資料
spotMaxInflownumbernumber现货主力资金积累 (USD)
spotGoodsListarrayarray现货資料列表
    timeRangestringstring时间范围
    timeParticleEnumintegerinteger統計时间粒度
    tradeInflownumberstring交易净流入金额 (USD)
    tradeAmountnumberstring交易量 (USD)
    tradeInflowChangedoublenumber交易净流入变化率
    tradeOutnumberstring交易流出金额 (USD)
    tradeInnumberstring交易流入金额 (USD)
hasContractbooleanboolean是否存在合约資料
contractMaxInflownumbernumber合约主力资金积累 (USD)
contractListarrayarray合约資料列表
    timeRangestringstring时间范围
    timeParticleEnumintegerinteger統計时间粒度
    tradeInflownumberstring交易净流入金额 (USD)
    tradeAmountnumberstring交易量 (USD)
    tradeInflowChangedoublenumber交易净流入变化率
    tradeOutnumberstring交易流出金额 (USD)
    tradeInnumberstring交易流入金额 (USD)

欄位业务含义

欄位业务含义使用建议
spotMaxInflow现货主力积累现货主力资金为现货交易的90d(天)内各时间窗口中,资金净流入的最大值
contractMaxInflow合约主力积累合约主力资金为合约交易的90d(天)内各时间窗口中,资金净流入的最大值
hasSpotGoods现货資料識別true表示有现货資料,false表示无现货資料,无时间要求时預設给90d以内的全部时间周期資料
hasContract合约資料識別true表示有合约資料,false表示无合约資料,非时间要求时預設给90d以内的全部时间周期資料
tradeInflowChange净流入变化率当前时间周期的资金与上个时间周期的资金对比

請求示例

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

cURL 示例(Linux/macOS)

bash
curl --location --request POST 'http://${host}/api/open/v1/trade/getCoinTrade' \
--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/trade/getCoinTrade" ^
--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": {
        "updateTime": 1773220800000,               // 更新时间
        "vsTokenId": "1",                           // 代幣 ID
        "symbol": "BTC",                             // 代幣符号
        "name": "Bitcoin",                           // 代幣名称
        "hasSpotGoods": true,                         // 是否存在现货資料
        "spotMaxInflow": 2588472.3329447997,          // 现货主力资金积累 (USD)
        "spotGoodsList": [
            {
                "timeRange": "5m",                    // 时间范围
                "timeParticleEnum": 5,                 // 統計时间粒度
                "tradeInflow": "1914106.2828805007",    // 交易净流入金额 (USD)
                "tradeAmount": "4389778.5824913",       // 交易量 (USD)
                "tradeInflowChange": 373.39,            // 交易净流入变化率
                "tradeOut": "2475814.5678",              // 交易流出金额 (USD)
                "tradeIn": "4389920.8506"                // 交易流入金额 (USD)
            },
            {
                "timeRange": "15m",                    // 时间范围
                "timeParticleEnum": 15,                 // 統計时间粒度
                "tradeInflow": "2588472.3329447997",    // 交易净流入金额 (USD)
                "tradeAmount": "8590968.535904001",     // 交易量 (USD)
                "tradeInflowChange": 2.06,              // 交易净流入变化率
                "tradeOut": "6002496.2029",              // 交易流出金额 (USD)
                "tradeIn": "8590968.5359"                // 交易流入金额 (USD)
            },
            {
                "timeRange": "30m",                    // 时间范围
                "timeParticleEnum": 30,                 // 統計时间粒度
                "tradeInflow": "137283.75568691065",    // 交易净流入金额 (USD)
                "tradeAmount": "33263896.482198115",    // 交易量 (USD)
                "tradeInflowChange": -0.95,             // 交易净流入变化率
                "tradeOut": "33126612.7265",             // 交易流出金额 (USD)
                "tradeIn": "33263896.4822"               // 交易流入金额 (USD)
            }
            // ... 更多資料省略
        ],
        "hasContract": true,                           // 是否存在合约資料
        "contractMaxInflow": 17609356.027199995,       // 合约主力资金积累 (USD)
        "contractList": [
            {
                "timeRange": "5m",                      // 时间范围
                "timeParticleEnum": 5,                   // 統計时间粒度
                "tradeInflow": "9098861.077599995",      // 交易净流入金额 (USD)
                "tradeAmount": "32832991.129399996",     // 交易量 (USD)
                "tradeInflowChange": 3.18,               // 交易净流入变化率
                "tradeOut": "23734130.0518",              // 交易流出金额 (USD)
                "tradeIn": "32832991.1294"                // 交易流入金额 (USD)
            },
            {
                "timeRange": "15m",                      // 时间范围
                "timeParticleEnum": 15,                   // 統計时间粒度
                "tradeInflow": "13098330.522699993",      // 交易净流入金额 (USD)
                "tradeAmount": "72156543.4141",           // 交易量 (USD)
                "tradeInflowChange": 1.9,                 // 交易净流入变化率
                "tradeOut": "59058212.8914",              // 交易流出金额 (USD)
                "tradeIn": "72156543.4141"                // 交易流入金额 (USD)
            },
            {
                "timeRange": "30m",                      // 时间范围
                "timeParticleEnum": 30,                   // 統計时间粒度
                "tradeInflow": "17609356.027199995",      // 交易净流入金额 (USD)
                "tradeAmount": "162089903.7944",           // 交易量 (USD)
                "tradeInflowChange": 3.33,                // 交易净流入变化率
                "tradeOut": "144480547.7672",              // 交易流出金额 (USD)
                "tradeIn": "162089903.7944"                // 交易流入金额 (USD)
            }
            // ... 更多資料省略
        ]
    },
    "requestId": "xxx-xxx-xxx"
}