Risk Unit Interest History(TRADE)
API Description
Query Institutional loan risk unit interest history. This endpoint is accessible only with the credit account API key.
HTTP Request
GET /sapi/v1/margin/loan-group/interest-history
Request Weight
10(IP)
RequestParameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
| groupId | LONG | NO | Risk unit unique identifier |
| asset | STRING | NO | Asset Name , USDT or USDC |
| startTime | LONG | NO | |
| endTime | LONG | NO | |
| current | LONG | NO | The currently querying page. Start from 1. Default:1 |
| size | LONG | NO | Default:10 Max:100 |
- Credit account can query currently activated and closed risk units using the parameter groupId. If groupId is empty, only currently activated risk units are returned.
- Responses are returned in descending order.
- The max interval between startTime and endTime is 100 days. This is required to ensure data accuracy.
- If startTime and endTime are not provided, data from the last 7 days is returned by default.
- If startTime is provided but endTime is omitted, returns records of [max(startTime, now-30d), now].
- If startTime is omitted but endTime is provided, returns records of [endTime-7, endTime].
Response Example
{
"total": 2,
"rows": [
{
"groupId": 2,
"assetName": "USDC",
"principal": 851340.57601652,
"interestRate": 0.00000833,
"interest": 7.09447643,
"interestTimestamp": 1746442800000
},
{
"groupId": 2,
"assetName": "USDC",
"principal": 851340.57601652,
"interestRate": 0.00000833,
"interest": 7.09447643,
"interestTimestamp": 1746439200000
}
]
}
Response detail description
| Parameter | Type | Description |
|---|---|---|
| total | STRING | Number of historical interest records |
| rows | OBJECT ARRAY | |
| → groupId | STRING | Risk unit unique identifier |
| → assetName | STRING | Borrowed asset name |
| → principal | STRING | Principal amount |
| → interestRate | STRING | Hourly interest rate |
| → interest | STRING | Interest amount |
| → interestTimestamp | LONG | Interest last update timestamp (milliseconds) |