Order Lifecycle
Every order on the platform moves through a defined set of states from the moment you submit it until it is fully resolved. Understanding these states helps you interpret your order blotter, anticipate system behaviour, and manage your book effectively.
Order states
| State | Description |
|---|---|
initialising | The order has been received by the engine and is being validated and registered. This state is transient and typically lasts milliseconds. |
working | The order is live in the matching queue and eligible to trade. |
partial | The order has been partially filled. The remaining workingQuantity is still live and eligible to match. |
filled | The order has been completely filled. No working quantity remains. This is a terminal state. |
held | The order exists in the system but is not in the matching queue. It will not trade until you release it. |
cancelled | The order was cancelled, either by you or by the system at session close. This is a terminal state. |
rejected | The order was rejected at submission — for example, due to a failed validation or insufficient credit. This is a terminal state. |
expired | The order was removed from the book when its contract expired or the trading session closed. This is a terminal state. |
Terminal states
Once an order reaches a terminal state it will never match or change again. The four terminal states are:
filledexpiredcancelledrejected
You cannot modify, cancel, or release an order that is already in a terminal state.
Cancellable states
You can cancel an order while it is in any of these states:
workingpartialheld
Cancelling a partial order cancels the remaining unfilled quantity. The fills that have already occurred are permanent.
State transitions
The diagram below shows the normal progression of an order:
┌─────────────┐
submit ──────────►│ initialising│
└──────┬──────┘
│
┌───────────┴───────────┐
│ │
held=true held=false
│ │
▼ ▼
┌──────┐ ┌─────────┐
│ held │◄────────────►│ working │
└──┬───┘ toggle └────┬────┘
│ │
cancel match
│ │
▼ ▼
┌──────────┐ ┌─────────┐
│cancelled │ │ partial │
└──────────┘ └────┬────┘
│
┌──────────┴──────────┐
│ │
match cancel/
(fully filled) expire
│ │
▼ ▼
┌────────┐ ┌──────────────────┐
│ filled │ │cancelled / expired│
└────────┘ └──────────────────┘
Key transitions
initialising → working
An order without the held flag moves directly to working once validated and queued.
initialising → held
An order submitted with Submit as held ticked moves to held instead of working.
held ↔ working
You can toggle a held order to working (release it) or toggle a working order back to held (re-hold it) at any time. This is a two-way transition.
working → partial
A partial match reduces the order's workingQuantity. The remainder stays in the queue.
partial → filled
When the last portion of workingQuantity is matched, the order becomes fully filled.
working or partial → cancelled
Explicit cancellation by you moves the order to cancelled.
working, partial, or held → expired
At session close, GFD (Good For Day) orders that have not fully filled are expired. When a contract's delivery period ends, any remaining orders on that contract are also expired.
Quantity tracking
Every order tracks three quantity fields that always sum to the original quantity:
| Field | Meaning |
|---|---|
workingQuantity | The quantity still live in the matching queue (or reserved while held). |
filledQuantity | The total quantity matched across all fills so far. |
cancelledQuantity | The quantity removed when the order was cancelled or expired. |
For example, an order for 10 MW that fills 6 MW and is then cancelled has:
workingQuantity: 0filledQuantity: 6cancelledQuantity: 4
Expiry reasons
When the system expires an order, it records one of two reasons:
GFD_EXPIRY
The order was a Good For Day (GFD) order — the default time-in-force — and the trading session closed before it was fully filled. All working and partial GFD orders are expired at market close.
CONTRACT_EXPIRY
The contract the order was placed against reached the end of its delivery period. The order is expired regardless of session state.
Good Till Cancelled (GTC) orders are not currently available on the platform. All orders default to GFD and expire at the end of each trading day.
Next steps
- Held Orders — how to stage orders before releasing them to the book
- Fills & Settlement — what happens when your order matches
- Market Sessions — when orders can be submitted and when expiry occurs