Order Status
When a valid order is received by CoinJar Exchange, its initial status is returned immediately. The status can be one of the following:
-
active: A stop-limit (STL) order has been accepted and is waiting for its trigger condition. It is not on the order book and cannot receive fills, but the required
funds are reserved. An active order has a filled value of zero. -
booked: The order has been accepted and placed on the order book. If the order receives a partial fill, it remains booked with a non-zero filled value. An order with a
time-in-force of AO remains booked until the end of the auction. -
filled: The order has been completely filled. A marketable order may immediately receive this status.
-
cancelled: The order has been cancelled. An initial status of cancelled indicates that the order did not satisfy its time-in-force condition, such as a non-marketable
IOC order. If the order received partial fills before cancellation, it has a non-zero filled value.
Stop-limit order lifecycle
A stop-limit order initially has a status of active. While active, it remains outside the order book until its trigger condition is met or it is cancelled.
Stop-limit orders are evaluated using the product's mark price:
mark_price = median(best_bid, best_ask, last_trade_price)
The trigger conditions are:
- A buy stop-limit order triggers when mark_price is greater than or equal to trigger_price.
- A sell stop-limit order triggers when mark_price is less than or equal to trigger_price.
The mark price only determines when the stop-limit order is activated. It is not the order's execution price.
After triggering, the order behaves like a GTC limit order using its specified limit price:
| transition | meaning |
|---|---|
| active → booked | The order was triggered but was not completely filled. The unfilled quantity is placed on the order book. The filled value may be zero or non- zero. |
| active → filled | The order was triggered and immediately filled completely. |
| active → cancelled | The order was cancelled before it triggered. Its reserved funds are released. |
| booked → filled | The remaining booked quantity was completely filled. |
| booked → cancelled | The remaining booked quantity was cancelled. Any unspent reserved funds are released. |
Triggering does not create a new order. The same oid is used throughout the order's lifecycle, type remains STL, and trigger_price remains present after triggering.
Use status: active to determine whether a stop-limit order is still waiting to trigger. The presence of trigger_price alone does not indicate that the order is still
active.
Both filled and cancelled are permanent states. A booked order transitions to filled when it is completely filled, or to cancelled if its remaining quantity is cancelled.
Updated 9 days ago
