Skip to content

Token Flow

Description

Returns inflow/outflow and change-rate data between on-chain holding addresses and centralized exchanges (CEX) for a token.

Use cases:

  • Assess market sentiment and capital flow trends
  • Analyze interactions between on-chain funds and exchange funds

Update frequency: Updated once per day

Endpoint

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

Credits

  • Cost: 2

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
vsTokenIdlongstringToken ID
symbolstringstringToken symbol
namestringstringToken name
coinTradeFlowDataV1VosarrayarrayExchange data list
    timeRangestringstringTime range
    timeParticleEnumintegerintegerStatistical time granularity
    tradeInnumberstringTrade inflow amount (USD)
    tradeOutnumberstringTrade outflow amount (USD)
    tradeInNumbernumberstringTrade inflow quantity
    tradeOutNumbernumberstringTrade outflow quantity
    tradeInflownumberstringNet trade inflow amount (USD)
    tradeAmountnumberstringTrade volume (USD)
    tradeInflowChangenumbernumberNet inflow change rate

Field semantics

FieldMeaningTip
tradeInflowNet trade inflowPositive means funds flowing into exchanges (bearish); negative means funds flowing out of exchanges (bullish)
tradeInflowChangeNet inflow change rateReflects acceleration of inflow; positive accelerates inflow, negative accelerates outflow

Example

json
{
    "vsTokenId": 1   // Token ID
}

cURL (Linux/macOS)

bash
curl --location --request POST 'http://${host}/api/open/v1/trade/getCoinTradeFlow' \
--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/getCoinTradeFlow" ^
--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": {
        "vsTokenId": "1",                                 // Token ID
        "symbol": "BTC",                                  // Token symbol
        "name": "Bitcoin",                                // Token name
        "coinTradeFlowDataV1Vos": [
            {
                "timeRange": "H1",                         // Time range
                "timeParticleEnum": 101,                   // Statistical time granularity
                "tradeIn": "18287486.3421524716",          // Trade inflow amount (USD)
                "tradeOut": "20431186.0069537593",         // Trade outflow amount (USD)
                "tradeInNumber": "261.06338392",           // Trade inflow quantity
                "tradeOutNumber": "292.2527353",           // Trade outflow quantity
                "tradeInflow": "-2143699.6648012877",      // Net trade inflow amount (USD)
                "tradeAmount": "38718672.3491062309",      // Trade volume (USD)
                "tradeInflowChange": -1.0504178361         // Net inflow change rate
            },
            {
                "timeRange": "H2",
                "timeParticleEnum": 102,
                "tradeIn": "65441054.6086384475",
                "tradeOut": "25066077.7308015143",
                "tradeInNumber": "935.91343814",
                "tradeOutNumber": "358.55940114",
                "tradeInflow": "40374976.8778369332",
                "tradeAmount": "90507132.3394399618",
                "tradeInflowChange": -0.0011861865
            },
            {
                "timeRange": "H4",
                "timeParticleEnum": 104,
                "tradeIn": "142822570.5758415342",
                "tradeOut": "62024667.6912203477",
                "tradeInNumber": "2047.31953966",
                "tradeOutNumber": "889.23850568",
                "tradeInflow": "80797902.8846211865",
                "tradeAmount": "204847238.2670618819",
                "tradeInflowChange": 0.4744189803
            }
            // ... more data omitted
        ]
    },
    "requestId": "xxx-xxx-xxx"
}