kind and a record.
It differs from Get order history in these ways:
- It includes finished order strategies as
"kind": "strategy"records. Open strategies are not included. - It leaves out orders that a strategy placed. A strategy sets
parent_idon each order that it places. You can find these orders in the strategy record’sowned_orders. - It sorts by creation time. Get order history sorts by order ID.
has_moreistrueonly when another page exists.
Query Parameters
| Field | Type | Need | Description | Example |
|---|---|---|---|---|
”account” | string | required | Account address | 42trU9A5… |
“limit” | integer | optional | Maximum number of records to return. Default and maximum are 100. Values outside 1 to 100 are clamped to that range | 100 |
”cursor” | string | optional | The “next_cursor” value from the previous page. Leave it out to get the first page | pxinAJf8… |
Response
- Status 200: Successfully retrieved order history records
| Field | Type | Description |
|---|---|---|
”kind” | string | ”order” or “strategy" |
"record” | object | An order record or a strategy record, as set by “kind” (see below) |
“next_cursor” | string | Cursor for the next page. Omitted when “has_more” is false |
”has_more” | boolean | true if more records exist after this page |
cursor set to next_cursor. Treat the cursor as an opaque string. It doesn’t work with Get order history.
Order Record Fields ("kind": "order")
Each order appears once, in its latest state.
| Field | Type | Description |
|---|---|---|
”order_id” | integer | Order id assigned to order |
”client_order_id” | UUID | CLOID of order if assigned by user |
”parent_id” | UUID or null | Always null in this endpoint |
”symbol” | string | Trading pair symbol |
”side” | string | Whether the order is a bid or an ask |
”initial_price” | decimal string | Initial (limit) price of the order |
”average_filled_price” | decimal string | VWAP of price at which the order was filled. “0” if nothing has filled |
”amount” | decimal string | Amount (in token denomination) of the order placed |
”filled_amount” | decimal string | Amount (in token denomination) of the order placed that was filled |
”order_status” | string | ”open""partially_filled""filled""cancelled""rejected" |
"order_type” | string | ”limit""market""stop_limit""stop_market""take_profit_limit""stop_loss_limit""take_profit_market""stop_loss_market" |
"stop_price” | decimal string | Stop price of a stop order |
”stop_parent_order_id” | integer | Parent order id of a stop order |
”reduce_only” | boolean | If the order is reduce only |
”trigger_price_type” | string | Price type used to trigger stop orders (mark_price, last_trade_price, mid_price); defaults to last_trade_price |
”reason” | string | Provides reason for an order being “cancelled” or “rejected”:“cancel""force_cancel""expired""post_only_rejected""self_trade_prevented" |
"instrument_type” | string | ”perpetual” or “spot" |
"created_at” | integer | Timestamp in milliseconds of the first event for this order. The list sorts by this value |
”updated_at” | integer | Timestamp in milliseconds of the latest event for this order |
"kind": "strategy")
A strategy record is a finished order strategy. The main fields are below. See Order strategies for the full shape, definition, and state.
| Field | Type | Description |
|---|---|---|
”strategy_id” | UUID | Strategy ID |
”strategy_type” | string | Strategy type, for example “twap" |
"lifecycle” | string | ”completed""cancelled""expired""failed" |
"terminal_reason” | string | Why the strategy ended, for example “user_cancel” or “insufficient_balance”. Omitted when no reason applies |
”owned_orders” | array | Orders that the strategy placed |
”created_at_ms” | integer | Timestamp in milliseconds when the strategy was created. The list sorts by this value |
”updated_at_ms” | integer | Timestamp in milliseconds when the strategy last changed |
- Status 400: Invalid request parameters or invalid cursor
- Status 500: Internal server error