Get trade history
Returns the caller's historical fills, with optional filters (symbol, time range, cursor, order IDs, client order ID) and pagination.
Request Parametersβ
| Name | Type | Required | Description |
|---|---|---|---|
| symbol | String | No | Trading symbol filter (e.g., BTC-PERP). Optional; when omitted, fills across all symbols are returned. |
| startTime | Long | No | Return only fills executed at or after this Unix timestamp in milliseconds. |
| endTime | Long | No | Return only fills executed before this Unix timestamp in milliseconds. Must be greater than startTime. |
| beforeSerialId | Long | No | Pagination cursor: return fills with serial id less than this value. |
| afterSerialId | Long | No | Pagination cursor: return fills with serial id greater than this value. |
| orderIds | String[] | No | Restrict results to fills belonging to these order IDs. |
| clOrderId | String | No | Restrict results to fills belonging to this client-assigned order ID. |
| count | Integer | No | Maximum number of fills per page. |
| page | Integer | No | Page number (1-based). |
Response Contentβ
| Name | Type | Description |
|---|---|---|
| tradeId | String | Unique fill (trade) identifier. |
| orderId | String | Order identifier this fill belongs to. |
| clOrderId | String | Client-assigned order identifier this fill belongs to. |
| positionId | String | Position identifier this fill contributed to. |
| orderSide | String | Trade side: BUY or SELL. |
| type | Integer | Numeric order type code of the order that produced this fill. |
| orderDetailType | String | Detailed classification of the fill (e.g., regular trade, liquidation, funding). β TWAP Β· PARTIAL_LIQUIDATION Β· FORCED_MARKET_BUY Β· FORCED_MARKET_SELL |
| price | Double | Order price originally submitted by the user. |
| size | Long | Original order size, in contracts. |
| avgFilledPrice | Double | Execution price of this fill. |
| filledSize | Long | Filled quantity of this fill, in contracts. |
| triggerPrice | Double | Trigger price for stop/trigger orders; 0 when not applicable. |
| contractSize | Double | Contract multiplier for the symbol at the time of the fill. |
| base | String | Base currency of the trading symbol. |
| quote | String | Quote currency of the trading symbol. |
| symbol | String | Trading symbol. |
| wallet | String | Wallet name associated with the fill. |
| feeCurrency | String | Currency the fee was charged in. |
| feeAmount | Double | Fee amount charged for this fill. |
| realizedPnl | Double | Realized profit or loss from this fill, in the quote currency. |
| total | Double | Total notional value of this fill (price * filled size * contract size). |
| serialId | Integer | Monotonically increasing serial id used for cursor-based pagination. |
| timestamp | Long | Fill execution time, Unix timestamp in milliseconds. |
example
GET
https://api.btse.com/futures/api/v3/trade/trade_historyResponse (default)
[
{
"tradeId": "1ad38104-6248-4a45-bc56-5fa9bf7f3868",
"orderId": "8ad94105-8cce-4e01-86b8-2d0fb403db66",
"clOrderId": "",
"positionId": "BTC-PERP-USDT",
"orderSide": "BUY",
"type": 77,
"orderDetailType": null,
"price": 0,
"size": 1,
"avgFilledPrice": 60010,
"filledSize": 1,
"triggerPrice": 0,
"contractSize": 0.00001,
"base": "BTC",
"quote": "USDT",
"symbol": "BTC-PERP",
"wallet": "BTC-PERP Isolated Wallet",
"feeCurrency": "USDT",
"feeAmount": 0.00012002,
"realizedPnl": 0,
"total": -0.00012002,
"serialId": 375598162,
"timestamp": 1784882344446
}
]