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#
| Field | Type | Required | Default | Explanation |
|---|---|---|---|---|
| investmentId | String | Yes | — | Investment product ID (Query parameter) |
| timeRange | String | No | WEEK | Time 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=124Example 2: Query the past year's TVL line chart#
GET /api/v6/defi/product/tvl/chart?timeRange=YEAR&investmentId=124Response Parameters#
| Field | Type | Explanation |
|---|---|---|
| chartVos | Array | TVL line chart data list |
| > timestamp | String | Statistics timestamp (milliseconds) |
| > tvl | String | TVL value (USD) |
| > limitValue | Integer | Extreme value marker: 1=highest point, -1=lowest point, null=regular point |
| text | String | Line 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
}
}