Historical APY Line Chart#
When a user wants to view the historical yield trend of an investment product, use this endpoint. Pass in the product ID and time range (WEEK / MONTH / SEASON / YEAR), and it returns APY data at each time point, which can be used to plot a line chart showing the yield trend.
URL: GET /api/v6/defi/product/rate/chart
Request Parameters#
| Field | Type | Required | Default | Explanation |
|---|---|---|---|---|
| investmentId | String | Yes | — | Investment Product ID |
| timeRange | String | No | WEEK | Time range: WEEK (one week), MONTH (one month), SEASON (three months), YEAR (one year) |
Request Examples#
Example 1: Query APY Line Chart for Past Week (Default)#
GET /api/v6/defi/product/rate/chart?investmentId=124Example 2: Query APY Line Chart for Past Three Months#
GET /api/v6/defi/product/rate/chart?investmentId=124&timeRange=SEASONResponse Parameters#
| Field | Type | Explanation |
|---|---|---|
| timestamp | String | Statistical timestamp (milliseconds) |
| rate | String | Investment product yield (including base interest rate + mining coin reward) |
| bonusRate | String | Additional bonus yield (OKX Bonus/Merkl, etc.) |
| limitValue | Integer | Limit value marking: 1=highest point, -1=lowest point, null=normal point |
| totalReward | String | Total fee + bonus reward during the statistical period |
Response Example#
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"
}
]
}