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 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

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)