历史 APY 折线图#
当用户希望查看某个投资品的历史收益率走势时,使用此接口。传入投资品 ID 和时间范围(WEEK / MONTH / SEASON / YEAR),返回各时间点的 APY 数据,可用于绘制折线图展示收益率变化趋势。
URL:GET /api/v6/defi/product/rate/chart
请求参数#
| 字段 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
| investmentId | String | 是 | — | 投资品 ID |
| timeRange | String | 否 | WEEK | 时间范围枚举:WEEK(一周)、MONTH(一月)、SEASON(三月)、YEAR(一年) |
请求示例#
示例 1:查询近一周 APY 折线图(默认)#
GET /api/v6/defi/product/rate/chart?investmentId=124示例 2:查询近三月 APY 折线图#
GET /api/v6/defi/product/rate/chart?investmentId=124&timeRange=SEASON响应参数#
| 字段 | 类型 | 说明 |
|---|---|---|
| timestamp | String | 统计时间戳(毫秒) |
| rate | String | 投资品收益率(含基础利率 + 矿币奖励) |
| bonusRate | String | 额外奖励收益率(OKX Bonus / Merkl 等) |
| limitValue | Integer | 极限值标记:1=最高点,-1=最低点,null=普通点 |
| totalReward | String | 该统计周期内手续费 + bonus 奖励合计 |
响应示例#
Json
{
"code": 0,
"msg": "",
"data": [
{
"timestamp": 1741737600000,
"rate": "0.0312",
"bonusRate": "0.0045",
"limitValue": 1,
"totalReward": "0.0357"
},
{
"timestamp": 1741651200000,
"rate": "0.0298",
"bonusRate": "0.0045",
"limitValue": null,
"totalReward": "0.0343"
}
]
}