Skip to main content

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

NameTypeMandatoryDescription
groupIdLONGNORisk unit unique identifier
assetSTRINGNOAsset Name , USDT or USDC
startTimeLONGNO
endTimeLONGNO
currentLONGNOThe currently querying page. Start from 1. Default:1
sizeLONGNODefault: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

ParameterTypeDescription
totalSTRINGNumber of historical interest records
rowsOBJECT ARRAY
→ groupIdSTRINGRisk unit unique identifier
→ assetNameSTRINGBorrowed asset name
→ principalSTRINGPrincipal amount
→ interestRateSTRINGHourly interest rate
→ interestSTRINGInterest amount
→ interestTimestampLONGInterest last update timestamp (milliseconds)