Risk Unit borrow/repay records(TRADE)
API Description
Get borrow/repay records in the Institution Loan Risk Unit. This endpoint is accessible only with the credit account API key.
HTTP Request
GET /sapi/v1/margin/loan-group/borrow-repay
Request Weight
10(IP)
RequestParameters
Name | Type | Mandatory | Description |
---|---|---|---|
groupId | LONG | NO | Risk unit unique identifier |
type | STRING | YES | BORROWorREPAY |
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 |
recvWindow | LONG | NO | The value cannot be greater than 60000 |
timestamp | LONG | YES |
- 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
- If the asset parameter is provided, the maximum query time range is 30 days ahead of endTime; if the asset parameter is not provided the maximum query time range is 7 days ahead of endTime
- If neither startTime nor endTime is sent, the recent 7-day data will be returned.
- startTime set as endTime - 7days by default, endTime set as current time by default
- The length of startTime and endTime cannot exceed 100 days, otherwise an error is reported and no record is returned.
Response Example
{
"total": 1,
"rows": [
{
"tranId": 1648963682,
"assetName": "USDT",
"amount": 300,
"status": "CONFIRM",
"type": "BORROW",
"timestamp": 1750420899036 // Create Time
},
{
"tranId": 1648963682,
"assetName": "USDT",
"amount": 300,
"status": "FAILED",
"type": "BORROW",
"timestamp": 1750420899036 // Create Time
},
{
"tranId": 1648963682,
"assetName": "USDT",
"amount": 300,
"principal": 298,
"interest": 2,
"status": "CONFIRM",
"type": "REPAY",
"timestamp": 1750420899036 // Create Time
}
]}