Skip to content

Real-time capital accumulation

Description

Returns real-time capital data (net inflow) from centralized exchange trading for a specified token, plus same-day major-fund accumulation metrics, covering both spot and perpetual markets.

Use cases:

  • Monitor accumulation across time windows at different points within the day
  • Track major-fund behavior

Tips:

  • For intraday major flow, look at the max net inflow within 24h (hourly) windows; for major flow in general, look at the max net inflow within 90d (daily) windows.
  • Positive net inflow indicates major buying (bullish); negative net inflow indicates major selling (bearish).
  • When users ask about major flow in natural language without specifying market type, provide both spot and perpetual data.
  • For broad queries such as major-player analysis or overall major flow, call this endpoint.

Update frequency: Every 5 minutes

Endpoint

  • Method: POST
  • Path: /open/v1/trade/getCoinTrade

Credits

  • Cost: 4

Prerequisites

Obtain vsTokenId

ConditionDescriptionHow to obtain
vsTokenId availableUse cached vsTokenId; no repeat lookupAuto-extracted from context
vsTokenId missingCall POST /vs-token/listPrerequisite API call

Request parameters

Parameters are sent as JSON in the request body.

FieldTypeRequiredDescription
vsTokenIdlongYesToken ID

Response fields

Structure of fields inside the data object:

FieldTypeSerializedDescription
updateTimelonglongUpdated at (ms timestamp)
vsTokenIdlongstringToken ID
symbolstringstringToken symbol
namestringstringToken name
coinPricenumberstringToken price (USD)
marketCapnumberstringMarket cap (USD)
hasSpotGoodsbooleanbooleanWhether spot data exists
spotMaxInflownumbernumberSpot major-fund accumulation (USD)
spotGoodsListarrayarraySpot data list
    timeRangestringstringTime window
    timeParticleEnumintegerintegerStatistical granularity
    tradeInflownumberstringNet inflow (USD)
    tradeAmountnumberstringVolume (USD)
    tradeInflowChangedoublenumberNet-inflow change rate
    tradeOutnumberstringOutflow (USD)
    tradeInnumberstringInflow (USD)
hasContractbooleanbooleanWhether perpetual data exists
contractMaxInflownumbernumberPerpetual major-fund accumulation (USD)
contractListarrayarrayPerpetual data list
    timeRangestringstringTime window
    timeParticleEnumintegerintegerStatistical granularity
    tradeInflownumberstringNet inflow (USD)
    tradeAmountnumberstringVolume (USD)
    tradeInflowChangedoublenumberNet-inflow change rate
    tradeOutnumberstringOutflow (USD)
    tradeInnumberstringInflow (USD)

Field semantics

FieldMeaningTip
spotMaxInflowSpot major accumulationMax net inflow across all time windows within 90d for spot
contractMaxInflowPerpetual major accumulationMax net inflow across all time windows within 90d for perpetual
hasSpotGoodsSpot data flagtrue means spot data exists; when no time filter, defaults to all windows within ~90d
hasContractPerpetual data flagtrue means perpetual data exists; when no time filter, defaults to all windows within ~90d
tradeInflowChangeNet-inflow change rateCompares current window vs previous window

Example

json
{
    "vsTokenId": 1   // Token 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}"

Success response example

json
{
    "code": 200,
    "message": "success",
    "data": {
        "updateTime": 1773220800000,               // Updated at
        "vsTokenId": "1",                           // Token ID
        "symbol": "BTC",                             // Token symbol
        "name": "Bitcoin",                           // Token name
        "coinPrice": "70559.18",                      // Token price (USD)
        "marketCap": "1412725749093.2734",            // Market cap (USD)
        "hasSpotGoods": true,                         // Whether spot data exists
        "spotMaxInflow": 2588472.3329447997,          // Spot major-fund accumulation (USD)
        "spotGoodsList": [
            {
                "timeRange": "5m",                    // Time window
                "timeParticleEnum": 5,                 // Statistical granularity
                "tradeInflow": "1914106.2828805007",    // Net inflow (USD)
                "tradeAmount": "4389778.5824913",       // Volume (USD)
                "tradeInflowChange": 373.39,            // Net-inflow change rate
                "tradeOut": "2475814.5678",              // Outflow (USD)
                "tradeIn": "4389920.8506"                // Inflow (USD)
            },
            {
                "timeRange": "15m",
                "timeParticleEnum": 15,
                "tradeInflow": "2588472.3329447997",
                "tradeAmount": "8590968.535904001",
                "tradeInflowChange": 2.06,
                "tradeOut": "6002496.2029",
                "tradeIn": "8590968.5359"
            },
            {
                "timeRange": "30m",
                "timeParticleEnum": 30,
                "tradeInflow": "137283.75568691065",
                "tradeAmount": "33263896.482198115",
                "tradeInflowChange": -0.95,
                "tradeOut": "33126612.7265",
                "tradeIn": "33263896.4822"
            }
            // ... more rows omitted
        ],
        "hasContract": true,                           // Whether perpetual data exists
        "contractMaxInflow": 17609356.027199995,       // Perpetual major-fund accumulation (USD)
        "contractList": [
            {
                "timeRange": "5m",
                "timeParticleEnum": 5,
                "tradeInflow": "9098861.077599995",
                "tradeAmount": "32832991.129399996",
                "tradeInflowChange": 3.18,
                "tradeOut": "23734130.0518",
                "tradeIn": "32832991.1294"
            },
            {
                "timeRange": "15m",
                "timeParticleEnum": 15,
                "tradeInflow": "13098330.522699993",
                "tradeAmount": "72156543.4141",
                "tradeInflowChange": 1.9,
                "tradeOut": "59058212.8914",
                "tradeIn": "72156543.4141"
            },
            {
                "timeRange": "30m",
                "timeParticleEnum": 30,
                "tradeInflow": "17609356.027199995",
                "tradeAmount": "162089903.7944",
                "tradeInflowChange": 3.33,
                "tradeOut": "144480547.7672",
                "tradeIn": "162089903.7944"
            }
            // ... more rows omitted
        ]
    },
    "requestId": "xxx-xxx-xxx"
}