D12 / Territory 12 of 49
Matching Engines and Venue Logic
Operate exchanges, auctions, and venue safeguards.
Published work
Released builds
in this territory.
Every card below is included in the current governed release with its article, sources, Python, TypeScript, and available labs.
Search the released libraryContinuous Matching
4 buildsMatching Engines and Venue Logic / Continuous Matching
Price-Time Priority
Matches an incoming order against resting orders by best price, then earliest arrival.Matching Engines and Venue Logic / Continuous Matching
Pro-Rata Matching
Allocates a fill across all resting orders at a price in proportion to size, ignoring arrival time.Matching Engines and Venue Logic / Continuous Matching
Size-Time Priority
Orders by size first and arrival second — rewarding large resting orders.Matching Engines and Venue Logic / Continuous Matching
Hybrid Pro-Rata/Time Matching
Splits an incoming order between a time-priority portion and a pro-rata portion — the compromise most futures venues actually run, because pure pro-rata invites size inflation and pure price-time invites a latency race.Auctions
5 buildsMatching Engines and Venue Logic / Auctions
Maximum-Executable-Volume Auction
Finds the price that crosses the most volume — the first and most important auction criterion.Matching Engines and Venue Logic / Auctions
Minimum-Imbalance Tie-Break
Applies the second auction criterion: among prices crossing equal volume, choose the one leaving the least unfilled imbalance.Matching Engines and Venue Logic / Auctions
Opening-Cross Price
Runs the full opening auction: maximum volume, minimum imbalance, then reference-price proximity, bounded by the permitted price range.Matching Engines and Venue Logic / Auctions
Closing-Cross Price
The closing auction, which sets the price index funds actually trade at.Matching Engines and Venue Logic / Auctions
Volatility-Auction Reopening
Classifies a volatility-auction reopening from scalar corridor state: continuous, no-cross, reopened, or extended.Order Controls
6 buildsMatching Engines and Venue Logic / Order Controls
Tick-Size Validation
Rejects a price that is not a whole multiple of the instrument's tick.Matching Engines and Venue Logic / Order Controls
Price-Band Validation
Checks a limit price against the venue's dynamic price band. Bands move with the reference price, so a valid order becomes invalid moments later — which is why the band's as-of time is part of the check.Matching Engines and Venue Logic / Order Controls
Self-Trade Prevention
Stops a participant trading with itself — required by most venues, and the *mode* determines who loses their order.Matching Engines and Venue Logic / Order Controls
Cancel-on-Disconnect
Decides which orders to pull when a session drops. Not every disconnect should cancel — a deliberate logout and a network failure are different events, and cancelling a hedge because of a brief blip is its own risk.Matching Engines and Venue Logic / Order Controls
Fat-Finger Limit
Blocks obviously erroneous orders on quantity, notional and aggressive price deviation.Matching Engines and Venue Logic / Order Controls
Circuit-Breaker Trigger
Evaluates market-wide circuit breaker levels against the index move.Order Lifecycle and Queue State
6 buildsMatching Engines and Venue Logic / Order Lifecycle and Queue State
Limit-Order Lifecycle State Machine
Replays an order's events into its state history — new, partially filled, replaced, cancelled, done.Matching Engines and Venue Logic / Order Lifecycle and Queue State
Cancel/Replace Priority Rule
Decides whether an amendment keeps queue position. Reducing quantity usually keeps it; raising quantity or changing price loses it. This one rule determines whether an amend is nearly free or extremely expensive.Matching Engines and Venue Logic / Order Lifecycle and Queue State
Partial-Fill and Residual-Quantity Processing
Tracks cumulative fills against an order and computes the residual.Matching Engines and Venue Logic / Order Lifecycle and Queue State
Queue Position and Ahead-Volume Calculation
How much volume sits ahead of a given order at its price. This is the number that decides fill probability under price-time priority — position in the queue, not distance from the touch.Matching Engines and Venue Logic / Order Lifecycle and Queue State
Iceberg/Reserve-Order Replenishment
Manages a hidden reserve that refills the displayed quantity as it fills.Matching Engines and Venue Logic / Order Lifecycle and Queue State
Marketable-Order Multi-Level Sweep
Walks a marketable order across price levels until filled or exhausted — the matching-engine counterpart of the expected-fill-price calculation, producing actual fills rather than an estimate.Territory coverage
What this domain
is mapped to cover.
The published builds above are the released slice of this map. Every subject below belongs to this territory's charter.