Get Account Ledgers - margin_hf
This API endpoint returns all transfer (in and out) records in high-frequency margin trading account and supports multi-coin queries. The query results are sorted in descending order by createdAt and id.
HTTP REQUEST
GET /api/v3/hf/margin/account/ledgers
Example
GET /api/v3/hf/margin/account/ledgers?bizType=MARGIN_EXCHANGE¤cy=YOP,DAI&startAt=1601395200000
//Response
{
"code": "200000",
"data": [
{
"id": "42852417537",
"currency": "CSP",
"amount": "1.00000000",
"fee": "0.00000000",
"balance": "99999986.99999999",
"accountType": "MARGIN_V2",
"bizType": "MARGIN_EXCHANGE",
"direction": "in",
"createdAt": "1661347205743",
"context": "{'symbol':'CSP-USDT','orderId':'6306257dd9180300014c8d47','tradeId':'609522034689'}"
},
{
"id": "42852401152",
"currency": "CSP",
"amount": "1.00000000",
"fee": "0.00000000",
"balance": "99999985.99999999",
"accountType": "MARGIN_V2",
"bizType": "MARGIN_EXCHANGE",
"direction": "out",
"createdAt": "1661347205743",
"context": "{'symbol':'CSP-USDT','orderId':'63062585d9180300014c8d50','tradeId':'609522034689'}"
}
]
}
API KEY PERMISSIONS
This endpoint requires the General permission.
REQUEST URL
This endpoint support Spot URL
REQUEST RATE LIMIT
Spot weight
:2
PARAMETERS
Param | Type | Mandatory | Description |
---|---|---|---|
currency | String | No | currency, optional,can select more than one,separate with commas,select no more than 10 currencys,the default will be to query for all currencys if left empty |
direction | String | No | Direction of transaction (in or out): in -transfer in, out -transfer out |
bizType | String | No | Transaction type: TRANSFER - transfer funds, MARGIN_EXCHANGE - cross margin trade, ISOLATED_EXCHANGE - isolated margin trade, LIQUIDATION - liquidation, ASSERT_RETURN - forced liquidation asset return |
lastId | long | No | The id of the last set of data from the previous batch of data. By default, the latest information is given. |
limit | int | No | Default100 ,Max200 |
startAt | long | No | Start time (milisecond), the conditional limit createdAt |
endAt | long | No | End time (milisecond), the conditional limit createdAt |
TIP
If lastId
is configured, the information obtained < lastId
. Otherwise, it will go back to the latest information.
You can only obtain data from within a 3 _ 24
hour time range (i.e., from 3 _ 24
hours ago up to now) If you specify a time range that exceeds this limit, the system will default to data from within 3 * 24
hours.
If bizType is MARGIN_EXCHANGE or ISOLATED_EXCHANGE, the context field will contain additional information about the transaction (order id, transaction id, transaction pair).
RESPONSES
Param | Description |
---|---|
id | Unique key |
currency | currency |
amount | Change in funds balance |
fee | Deposit or withdrawal fee |
balance | Total balance of funds after change |
accountType | Master account type MARGIN_V2 、ISOLATED_V2 |
bizType | Trnasaction type,such as TRANSFER , MARGIN_EXCHANGE , etc. |
direction | Direction of transfer( out or in ) |
createdAt | Created |
context | Core transaction parameter |