Trade History
Query current user's historical trade records using cursor-based pagination, supports filtering by trading pair, side, and time range.
API Information
- Method:
GET - Path:
/api/v1/myTrades - Authentication: Requires signature authentication (see Common Module · Signature Specification)
Request Parameters
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
| symbol | query | string | No | Trading pair, e.g. BTC_USDT |
| side | query | integer | No | Side: 1=buy, 2=sell, 0=all |
| start_time | query | integer | No | Start time (milliseconds timestamp) |
| end_time | query | integer | No | End time (milliseconds timestamp) |
| cursor | query | integer | No | Cursor, do not pass for first query |
| limit | query | integer | No | Return quantity, default 500, max 1000 |
Request Example
GET /api/v1/myTrades?symbol=BTC_USDT&side=1&limit=100
Response Fields
| Field | Type | Description |
|---|---|---|
| code | integer | Status code |
| message | string | Response message |
| data.has_more | boolean | Has more data |
| data.next_cursor | integer | Next page cursor |
| data.trades | array | Trade list |
| data.trades[].id | string | Trade ID |
| data.trades[].order_id | string | Order ID |
| data.trades[].symbol | string | Trading pair |
| data.trades[].price | string | Trade price |
| data.trades[].qty | string | Trade quantity |
| data.trades[].quote_qty | string | Trade amount |
| data.trades[].fee | string | Fee |
| data.trades[].fee_asset | string | Fee asset |
| data.trades[].is_buyer | boolean | Is buyer |
| data.trades[].is_maker | boolean | Is maker |
| data.trades[].time | integer | Trade time (milliseconds) |
Response Example
{
"code": 0,
"message": "success",
"data": {
"has_more": false,
"next_cursor": 100,
"trades": [
{
"id": "9876543210123456789",
"order_id": "1234567890123456789",
"symbol": "BTC_USDT",
"price": "30000.00",
"qty": "0.1",
"quote_qty": "3000.00",
"fee": "0.0001",
"fee_asset": "BTC",
"is_buyer": true,
"is_maker": false,
"time": 1704067200000
}
]
}
}