Get historical orders
Retrieves historical orders with advanced filtering and pagination. Filter by product_id, time range (start_time/end_time), order status, client_order_ids, and liquidation status. Supports sorting by created_at or updated_at (ascending/descending). Maximum 1000 orders per request. Returns a list of orders matching the specified criteria.
Requires authentication.
In: header
In: header
Query Parameters
Filter results by a product_id.
Filter by minimum posted UNIX timestamp.
uint64Filter by maximum posted UNIX timestamp.
uint64Limit on number of results. Max limit is 1000
int64Filter results by order status.
- PENDING: Order has been submitted and is being processed
- OPEN: Order is active on the book
- DONE: Order is completed (filled or canceled)
- ACCEPTED: Order is scheduled/waiting for trigger (for stop/scheduled orders)
Sort the results using the given field. Supported values :created_at
(sort by created_at asc), -created_at (sort by created_at desc),
updated_at (sort by updated_at asc), -updated_at (sort by updated_at
desc).
Filter by client_order_id (case-insensitive).
Response Body
application/json
application/json
curl -X GET "https://api.dev.obsidian.exchange/order-history"{
"orders": [
{
"id": "string",
"product_id": "string",
"side": "BUY",
"type": "LIMIT",
"size": "string",
"price": "string",
"sender": "string",
"nonce": "string",
"stp": "CANCEL_TAKER",
"post_only": true,
"time_in_force": "GTC",
"reduce_only": true,
"status": "PENDING",
"done_reason": "string",
"stop_price": "string",
"stop_price_option": "NONE",
"order_stop_type": "STOP_NONE",
"is_liquidation": true,
"liquidation_fee_rate": "string",
"maker_fee_rate": "string",
"taker_fee_rate": "string",
"filled_size": "string",
"avg_price": "string",
"total_fees_usd": "string",
"created_at": "string",
"updated_at": "string",
"cancel_requested_at": "string",
"expired_at": "string",
"scheduled_at": "string",
"client_order_id": "string",
"cancel_requested": true,
"initial_margin": "string",
"last_trades": [
{
"id": "string",
"price": "string",
"size": "string",
"liquidity_indicator": "MAKER",
"time": "string",
"funding_payment": "string",
"trading_fee": "string",
"sequencer_fee": "string"
}
],
"sender_name": "string"
}
]
}{
"code": 0,
"message": "string",
"details": [
{
"@type": "string",
"property1": null,
"property2": null
}
]
}