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
| Condition | Description | How to obtain |
|---|---|---|
| vsTokenId available | Use cached vsTokenId; no repeat lookup | Auto-extracted from context |
| vsTokenId missing | Call POST /vs-token/list | Prerequisite API call |
Request parameters
Parameters are sent as JSON in the request body.
| Field | Type | Required | Description |
|---|---|---|---|
| vsTokenId | long | Yes | Token ID |
Response fields
Structure of fields inside the data object:
| Field | Type | Serialized | Description |
|---|---|---|---|
| vsTokenId | long | string | Token ID |
| symbol | string | string | Token symbol |
| name | string | string | Token name |
| coinTradeFlowDataV1Vos | array | array | Exchange data list |
| timeRange | string | string | Time range |
| timeParticleEnum | integer | integer | Statistical time granularity |
| tradeIn | number | string | Trade inflow amount (USD) |
| tradeOut | number | string | Trade outflow amount (USD) |
| tradeInNumber | number | string | Trade inflow quantity |
| tradeOutNumber | number | string | Trade outflow quantity |
| tradeInflow | number | string | Net trade inflow amount (USD) |
| tradeAmount | number | string | Trade volume (USD) |
| tradeInflowChange | number | number | Net inflow change rate |
Field semantics
| Field | Meaning | Tip |
|---|---|---|
| tradeInflow | Net trade inflow | Positive means funds flowing into exchanges (bearish); negative means funds flowing out of exchanges (bullish) |
| tradeInflowChange | Net inflow change rate | Reflects 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"
}