getOrderHistory
Query completed, cancelled, or expired orders from the past two years. Supports filtering by order type and status, with pagination for up to 7 days per request.
Instructions
Query historical order records. Supports up to 2 years of data.
Max time span between
startTimeandendTimeis 7 daysIf both time params omitted, returns last 7 days
Pagination via
cursortokenUse
orderFilterto target specific order typesUse
orderStatusto filter by terminal status
Agent hint: Use this endpoint to query completed/cancelled/expired orders. For currently active orders, use getOpenOrders instead. TradFi: use category=spot for xStock order history, category=linear for equity/commodity perpetual order history.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| category | Yes | ||
| symbol | No | ||
| baseCoin | No | ||
| settleCoin | No | ||
| orderId | No | ||
| orderLinkId | No | ||
| orderFilter | No | ||
| orderStatus | No | ||
| startTime | No | ||
| endTime | No | ||
| limit | No | ||
| cursor | No |