Account Ledger
Get futures account fund change records, with filtering by change type and time range using cursor pagination.
API Information
- Method:
GET - Path:
/fapi/v1/account/logs - Authentication: Requires signature authentication (see Common Module · Signature Specification)
Request Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
| change_type | query | integer | No | Change type (see table below) |
| start_time | query | integer | No | Start time (milliseconds timestamp) |
| end_time | query | integer | No | End time (milliseconds timestamp) |
| cursor | query | string | No | Pagination cursor |
| limit | query | integer | No | Page size, default 100, max 100 |
change_type Enum
| Value | Description |
|---|---|
| 1 | Deposit |
| 2 | Withdrawal |
| 3 | Trading fee |
| 4 | Realized PnL |
| 5 | Funding fee |
| 6 | Liquidation loss |
| 7 | Transfer in from spot |
| 8 | Transfer out to spot |
| 9 | Unfreeze after order cancellation |
| 10 | Maker rebate |
| 11 | Freeze order margin |
| 12 | Freeze order fee |
| 13 | Margin refund after trade |
| 14 | Unfreeze order fee |
| 15 | Close position settlement |
| 16 | Bankruptcy loss |
Request Example
GET /fapi/v1/account/logs?change_type=4&limit=50
Response Fields
| Field | Type | Description |
|---|---|---|
| code | integer | Status code |
| message | string | Response message |
| data.has_more | boolean | Whether more records exist |
| data.next_cursor | string | Next page cursor |
| data.items | array | Ledger record list |
| data.items[].id | integer | Ledger record ID |
| data.items[].asset | string | Asset type |
| data.items[].change_type | integer | Change type |
| data.items[].amount | string | Change amount |
| data.items[].balance_before | string | Balance before change |
| data.items[].balance_after | string | Balance after change |
| data.items[].related_id | integer | Related ID |
| data.items[].related_type | integer | Related type: 0=none, 1=order, 2=trade, 3=funding rate |
| data.items[].remark | string | Remark |
| data.items[].created_at | integer | Creation time (milliseconds) |
Response Example
{
"code": 0,
"message": "success",
"data": {
"has_more": true,
"next_cursor": "1711929600000",
"items": [
{
"id": 123456,
"asset": "USDT",
"change_type": 4,
"amount": "150.50",
"balance_before": "9850.00",
"balance_after": "10000.50",
"related_id": 789012,
"related_type": 2,
"remark": "Profit from closing position",
"created_at": 1711929600000
}
]
}
}