Auctions, halts, and safeguards
The market-level state machine: why continuous trading is only one mode among several, and how the exchange protects price formation under stress.
Order types describe what one order may do. The venue also has state that constrains what every order may do at a given market phase.
It is tempting to represent a halt with one boolean and switch directly back to continuous matching when the timer expires. The constraint it misses is simple: Market phase changes are sequenced state transitions, and every return to continuous trading passes through a batch price-discovery auction.
Continuous price-time matching assumes a steady stream of orders on both sides. At the open, after news, or in a panic, that assumption fails — and matching the first stray order at an absurd price would set an absurd price for the whole market. Exchanges therefore run each symbol through trading phases:
stateDiagram-v2
[*] --> PreOpen: orders accepted, no matching
PreOpen --> OpeningAuction: market open time
OpeningAuction --> Continuous: uncross at the equilibrium price
Continuous --> Halted: circuit breaker or news halt
Halted --> ReopenAuction: cooldown elapsed
ReopenAuction --> Continuous: uncross
Continuous --> ClosingAuction: end of day approaches
ClosingAuction --> Closed: uncross sets official close
Closed --> [*]
How an auction works: during the call phase, orders accumulate without matching — the book is allowed to cross. At the uncross, the engine computes the single price that maximizes executable volume, executes all crossing orders at that one price, and only then switches to continuous mode. The opening price is thus a consensus of everyone's overnight interest, not a race.
Safeguards during continuous trading:
- Price bands (limit-up / limit-down): orders that would trade more than, say, 5% away from a rolling reference price are rejected or the symbol is paused. This is the fat-finger backstop.
- Volatility circuit breakers: if the price moves beyond a threshold within a window, the symbol transitions to
Halted, then re-enters via auction. Market-wide breakers do the same for everything at once. - Message throttles: per-participant caps on orders per second — protecting the venue from runaway algorithms (and lesson 2.7 will generalize this into overload defense).
Note the design economy: halts, auctions, and continuous trading are all just modes of the same engine over the same book — an auction is matching with the uncross deferred. The phase machine slots into the engine's event stream like any other input (a timer event triggers the uncross), which means Part 2's replication story will cover it with no extra work.
After a 9% move, queued interest accumulates during the halt. Direct reopening gives the first arriving order privileged access to a stale book. An auction considers the accumulated demand together and establishes one reopening price before continuous priority resumes.
The market has phases; continuous trading is just one of them. Auctions bracket every entry into continuous mode — open, close, and post-halt. Bands, breakers, and throttles keep one bad actor or one bad moment from setting prices.