历史 TVL 折线图#
当用户希望查看某个投资品的历史 TVL(锁仓量)走势时,使用此接口。传入投资品 ID 和时间范围,返回各时间点的 TVL 数据,可用于评估投资品的规模变化趋势和市场热度。
URL:GET /api/v6/defi/product/tvl/chart
请求参数#
| 字段 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| investmentId | String | 是 | — | 投资品 ID(Query 参数) |
| timeRange | String | 否 | WEEK | 时间范围枚举:WEEK(一周)、MONTH(一月)、SEASON(三月)、YEAR(一年) |
请求示例#
示例 1:查询近一周 TVL 折线图(默认)#
GET /api/v6/defi/product/tvl/chart?investmentId=124示例 2:查询近一年 TVL 折线图#
GET /api/v6/defi/product/tvl/chart?timeRange=YEAR&investmentId=124响应参数#
| 字段 | 类型 | 说明 |
|---|---|---|
| chartVos | Array | TVL 折线图数据列表 |
| > timestamp | String | 统计时间戳(毫秒) |
| > tvl | String | TVL 值(USD) |
| > limitValue | Integer | 极限值标记:1=最高点,-1=最低点,null=普通点 |
| text | String | 折线图描述文本(可为空) |
响应示例#
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
}
}