Wallet API

Historical TVL Line Chart#

Use this endpoint when a user wants to view the historical TVL (Total Value Locked) trend of an investment product. Pass the investment product ID and time range, and it returns TVL data at each time point, which can be used to assess the product's scale changes and market popularity.

URL: GET /api/v6/defi/product/tvl/chart

Request Parameters#

FieldTypeRequiredDefaultExplanation
investmentIdStringYesInvestment product ID (Query parameter)
timeRangeStringNoWEEKTime range enum: WEEK (one week), MONTH (one month), SEASON (three months), YEAR (one year)

Request Examples#

Example 1: Query the past week's TVL line chart (default)#

GET /api/v6/defi/product/tvl/chart?investmentId=124

Example 2: Query the past year's TVL line chart#

GET /api/v6/defi/product/tvl/chart?timeRange=YEAR&investmentId=124

Response Parameters#

FieldTypeExplanation
chartVosArrayTVL line chart data list
> timestampStringStatistics timestamp (milliseconds)
> tvlStringTVL value (USD)
> limitValueIntegerExtreme value marker: 1=highest point, -1=lowest point, null=regular point
textStringLine chart description text (may be empty)

Response Example#

Json
{
    "code": 0,
    "msg": "",
    "data": {
        "chartVos": [
            {
                "timestamp": 1741737600000,
                "tvl": "523847291.45",
                "limitValue": 1
            },
            {
                "timestamp": 1741651200000,
                "tvl": "498312044.78",
                "limitValue": null
            },
            {
                "timestamp": 1741564800000,
                "tvl": "480125367.22",
                "limitValue": -1
            }
        ],
        "text": null
    }
}