Market Operations
Administrators with the Market.Operate permission can control market session state and platform configuration.
Market state machine (FSM)
The AEX market engine enforces a strict finite state machine (FSM). Only the transitions listed below are permitted — any attempt to jump directly between non-adjacent states is rejected with an error logged to the audit trail.
Valid state transitions
| From | To | Trigger | Notes |
|---|---|---|---|
closed | preopen | Scheduled timer | Fires automatically at the configured pre-open time each day |
closed | suspended | Admin halt | Operator halts while market is closed |
preopen | open | Auction complete | Engine executes opening auction uncrossing and transitions automatically |
preopen | suspended | Admin halt | Operator halts during pre-open window |
preopen | closed | Immediate close trigger | Scheduled close time arrives while still in pre-open (edge case) |
open | closed | Scheduled timer | Fires automatically at the configured close time; triggers GFD expiry and contract rollover |
open | suspended | Admin halt | Operator halts during live trading |
suspended | preopen | Admin unhalt | Operator resumes; engine replays any missed transitions |
suspended | open | Admin unhalt | Operator resumes directly to open if that is the clock-correct state |
suspended | closed | Admin unhalt | Operator resumes; scheduled close was missed while halted |
State diagram
┌──────────────────────────────┐
│ │
▼ halt │ unhalt
┌────────┐ ──────────────► ┌───────────┐
schedule │ closed │ │ suspended │
◄──────────── │ │ ◄────────────── │ │
└────┬───┘ unhalt └─────▲─────┘
│ │
timer │ halt │
▼ │
┌──────────┐ ┌──────┴───┐
│ preopen │ ──── halt ──►│ │
│ │ │ (any │
└────┬─────┘ │ state) │
│ └──────────-┘
auction │
complete │
▼
┌────────┐
│ open │ ──── halt ──► suspended
│ │
└────┬───┘
│
timer │ (close)
▼
closed
States at a glance
| State | UI label | Trading allowed | Matching active |
|---|---|---|---|
closed | CLOSED | No | No |
preopen | PRE-OPEN | Submit / modify / cancel only | No (IOP broadcast only) |
open | OPEN | Full | Yes |
suspended | SUSPENDED | No | No |
Halting the market
In exceptional circumstances, administrators can halt trading from any active state:
- Navigate to Management Panel → Admin
- Click Halt Market
- Confirm the halt — trading stops immediately
When halted:
- The market enters the
suspendedstate - All scheduled timers are frozen (pre-open and open timers do not fire)
- Matching stops; existing orders remain intact on the book
- The engine records the halt timestamp and the pre-halt state for use during resume
Halting the market affects all participants. Use only when operationally necessary and communicate the reason to market participants promptly.
Resuming the market (unhalt)
The resume process is a two-phase protocol designed to handle missed scheduled transitions safely:
Phase 1 — Review missed transitions
When you click Resume Market, the engine calculates which scheduled transitions were due while the market was suspended and presents a checklist. For each missed transition you can choose whether to replay it.
Common scenarios:
| Halted during | Close time passed? | Suggested resume action |
|---|---|---|
preopen | No | Resume to preopen — pre-open window continues |
preopen | Yes | Replay preopen → open (auction) and open → closed (session close) |
open | No | Resume to open — live matching resumes |
open | Yes | Replay open → closed (session close, GFD expiry, rollover) |
closed | N/A | Resume to closed — no transitions to replay |
Phase 2 — Execute resume
After confirming your selections:
- Selected missed transitions are replayed in chronological order
- The halt flag is cleared
- Scheduling timers are re-armed based on the current clock
- A
market.statebroadcast is sent to all connected clients
Missed transitions are re-validated at execution time. If the market schedule changed while the market was halted, only transitions that are still valid given the new schedule will be available.
Platform configuration
The Configuration panel allows administrators to manage:
- Market hours — trading session schedule (pre-open, open, close times)
- Auction window — duration of the opening auction
- Product catalogue — active products and contracts
- DST settings — daylight saving time transition handling
Changes to platform configuration require approval from a second administrator before taking effect.
Changing market hours while the market is suspended does not immediately move the FSM state. The FSM state is reconciled against the new schedule when the market is resumed. Changing hours while the market is in a normal (non-suspended) state applies immediately and reschedules the relevant timers.
Audit trail
Every state transition — whether scheduled, triggered by auction, or initiated by an administrator — is recorded in the audit log with:
- Timestamp (NZ timezone)
- Previous state and new state
- Transition reason (
scheduled,auction_complete,admin_halt,admin_unhalt,admin_unhalt_replay) - Operator user ID (for admin-initiated transitions)
Audit events are sent to the aex-audit Service Bus topic and are available in the Admin panel under Audit Log.