Skip to content

Balance Trend

Description

Returns holding balance data for a specified address and token on the blockchain. Supports querying balance changes over a time range by specifying the token, chain, and time period.

Use cases:

  • Track balance changes for a specific address
  • Identify accumulation and distribution behavior
  • Monitor dynamic holdings of whale addresses

Update frequency: Updated once per day

Endpoint

  • Method: POST
  • Path: /open/v1/chain/trade/token/balanceTrend

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

Obtain coinKey

ConditionDescriptionHow to obtain
coinKey availableUse cached coinKey; no repeat lookupAuto-extracted from context
coinKey missingCall POST /vs-token/detail to get coinKey for each chainPrerequisite API call

Obtain address

ConditionDescriptionHow to obtain
address availableUse known holding addressUser input
address missingCall POST /chain/trade/token/holdPage to query holding address listPrerequisite API call

Request parameters

Parameters are sent as JSON in the request body.

FieldTypeRequiredDescription
vsTokenIdlongYesToken ID
coinKeystringYesToken coinKey (chain + contract address); obtain from token details
addressstringYesAddress
startTimelongNoStart time (millisecond timestamp)
endTimelongYesEnd time (millisecond timestamp)

Response fields

Structure of each object in the data array:

FieldTypeSerializedDescription
vsTokenIdlongstringToken ID
symbolstringstringToken symbol
namestringstringToken name
datelonglongTime (millisecond timestamp)
balancenumberstringBalance
pricenumberstringToken price

Field semantics

FieldMeaningTip
balanceAddress balanceToken quantity held by the address; sustained increases indicate accumulation

Example

json
{
    "vsTokenId": 1,                         // Token ID
    "coinKey": "BTC_BTC",                    // Token coinKey (chain + contract address); obtain from token details
    "address": "3M219KR5vEneNb47ewrPfWyb5jQ2DjxRP6", // Address
    "endTime": 1773479265534                  // End time
}

cURL (Linux/macOS)

bash
curl --location --request POST 'http://${host}/api/open/v1/chain/trade/token/balanceTrend' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: xxxxx' \
--header 'X-TIMESTAMP: xxxxx' \
--header 'X-SIGN: xxxxx' \
--header 'Accept: */*' \
--data-raw '{
    "vsTokenId": 1,
    "coinKey": "BTC_BTC",
    "address": "3M219KR5vEneNb47ewrPfWyb5jQ2DjxRP6",
    "endTime": 1773479265534
}'

cURL (Windows CMD)

cmd
curl --location --request POST "http://${host}/api/open/v1/chain/trade/token/balanceTrend" ^
--header "Content-Type: application/json" ^
--header "X-API-KEY: xxxxx" ^
--header "X-TIMESTAMP: xxxxx" ^
--header "X-SIGN: xxxxx" ^
--header "Accept: */*" ^
--data-raw "{    \"vsTokenId\": 1,    \"coinKey\": \"BTC_BTC\",    \"address\": \"3M219KR5vEneNb47ewrPfWyb5jQ2DjxRP6\",    \"endTime\": 1773479265534}"

Success response example

json
{
    "code": 200,
    "message": "success",
    "data": [
        {
            "vsTokenId": "1",           // Token ID
            "symbol": "BTC",             // Token symbol
            "name": "Bitcoin",           // Token name
            "date": 1542038400000,       // Time
            "balance": "0",              // Balance
            "price": "6359.49"           // Token price
        },
        {
            "vsTokenId": "1",
            "symbol": "BTC",
            "name": "Bitcoin",
            "date": 1542124800000,
            "balance": "1",
            "price": "5738.35"
        },
        {
            "vsTokenId": "1",
            "symbol": "BTC",
            "name": "Bitcoin",
            "date": 1542211200000,
            "balance": "0",
            "price": "5648.03"
        }
        // ... more data omitted
    ],
    "requestId": "xxx-xxx-xxx"
}