Skip to main content

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

FromToTriggerNotes
closedpreopenScheduled timerFires automatically at the configured pre-open time each day
closedsuspendedAdmin haltOperator halts while market is closed
preopenopenAuction completeEngine executes opening auction uncrossing and transitions automatically
preopensuspendedAdmin haltOperator halts during pre-open window
preopenclosedImmediate close triggerScheduled close time arrives while still in pre-open (edge case)
openclosedScheduled timerFires automatically at the configured close time; triggers GFD expiry and contract rollover
opensuspendedAdmin haltOperator halts during live trading
suspendedpreopenAdmin unhaltOperator resumes; engine replays any missed transitions
suspendedopenAdmin unhaltOperator resumes directly to open if that is the clock-correct state
suspendedclosedAdmin unhaltOperator 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

StateUI labelTrading allowedMatching active
closedCLOSEDNoNo
preopenPRE-OPENSubmit / modify / cancel onlyNo (IOP broadcast only)
openOPENFullYes
suspendedSUSPENDEDNoNo

Halting the market

In exceptional circumstances, administrators can halt trading from any active state:

  1. Navigate to Management PanelAdmin
  2. Click Halt Market
  3. Confirm the halt — trading stops immediately

When halted:

  • The market enters the suspended state
  • 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
caution

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 duringClose time passed?Suggested resume action
preopenNoResume to preopen — pre-open window continues
preopenYesReplay preopen → open (auction) and open → closed (session close)
openNoResume to open — live matching resumes
openYesReplay open → closed (session close, GFD expiry, rollover)
closedN/AResume to closed — no transitions to replay

Phase 2 — Execute resume

After confirming your selections:

  1. Selected missed transitions are replayed in chronological order
  2. The halt flag is cleared
  3. Scheduling timers are re-armed based on the current clock
  4. A market.state broadcast is sent to all connected clients
note

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.

note

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.