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
| 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 |
|---|---|---|---|
| updateTime | long | long | Updated at (ms timestamp) |
| vsTokenId | long | string | Token ID |
| symbol | string | string | Token symbol |
| name | string | string | Token name |
| coinPrice | number | string | Token price (USD) |
| marketCap | number | string | Market cap (USD) |
| hasSpotGoods | boolean | boolean | Whether spot data exists |
| spotMaxInflow | number | number | Spot major-fund accumulation (USD) |
| spotGoodsList | array | array | Spot data list |
| timeRange | string | string | Time window |
| timeParticleEnum | integer | integer | Statistical granularity |
| tradeInflow | number | string | Net inflow (USD) |
| tradeAmount | number | string | Volume (USD) |
| tradeInflowChange | double | number | Net-inflow change rate |
| tradeOut | number | string | Outflow (USD) |
| tradeIn | number | string | Inflow (USD) |
| hasContract | boolean | boolean | Whether perpetual data exists |
| contractMaxInflow | number | number | Perpetual major-fund accumulation (USD) |
| contractList | array | array | Perpetual data list |
| timeRange | string | string | Time window |
| timeParticleEnum | integer | integer | Statistical granularity |
| tradeInflow | number | string | Net inflow (USD) |
| tradeAmount | number | string | Volume (USD) |
| tradeInflowChange | double | number | Net-inflow change rate |
| tradeOut | number | string | Outflow (USD) |
| tradeIn | number | string | Inflow (USD) |
Field semantics
| Field | Meaning | Tip |
|---|---|---|
| spotMaxInflow | Spot major accumulation | Max net inflow across all time windows within 90d for spot |
| contractMaxInflow | Perpetual major accumulation | Max net inflow across all time windows within 90d for perpetual |
| hasSpotGoods | Spot data flag | true means spot data exists; when no time filter, defaults to all windows within ~90d |
| hasContract | Perpetual data flag | true means perpetual data exists; when no time filter, defaults to all windows within ~90d |
| tradeInflowChange | Net-inflow change rate | Compares 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"
}