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 either activated risk unit or closed risk unit with the specific groupId. The current activated risk unit will be returned if the parameter of groupId is not input.
- Response in descending order
- The max interval between startTime and endTime is 100 days. This is to ensure data accuracy.
- If startTime and endTime not sent, return records of the last 7 days by default.
- If startTime is sent and endTime is not sent, return records of [max(startTime, now-30d), now].
- If startTime is not sent and endTime is sent, return 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 desc
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) |