Short answer
Matching engine development is only partly about the matching rule, which fits on one page. Most of the work is the venue around it: a member gateway and sequencer in front, pre-trade and credit checks, market data and drop copy going out, market phases and halts, a journal that makes every session replayable, and failover that loses no acknowledged order. Scope these together with the engine, or the engine is rewritten when they arrive. License an engine when your market rules are standard; build one when the rules, the latency at the member's socket or the fee structure are what your venue sells.
How the order book, the matching loop, the journal and the replay harness are designed is covered in designing a matching engine in Rust. This page is about everything a venue needs around that core, because that is where most of a project's time goes.
| Component | Responsibility | Decide early |
|---|---|---|
| Member gateway | Sessions over FIX, binary or WebSocket protocols; authentication; message throttles | Which protocols members get on day one, and what happens to their orders on disconnect |
| Sequencer | Puts every inbound command in one total order and stamps it | Timestamps are input data, never read by the engine itself |
| Pre-trade and credit checks | Member limits, price collars, maximum order size | Which checks sit before the sequencer and which after it |
| Matching engine | Applies commands to the book under the venue's priority rule | Price-time or another priority rule, order types, self-trade prevention |
| Market data publisher | Top of book, depth, order-by-order feeds; snapshots and incrementals with sequence numbers | Whether a retransmission service exists for members who miss packets |
| Drop copy | A copy of every execution to members' risk and back-office systems | Per member or per trader, and what happens during a reconnect |
| Market phases | Pre-open, opening auction, continuous trading, closing auction, halts | The auction uncrossing algorithm and who can trigger a halt |
| Post-trade interface | Trades to clearing and settlement, or to a wallet ledger for crypto | Whether fees are computed in the engine or after it |
| Surveillance feed | Every order event, in sequence, for market abuse monitoring | Retention period and who can query it |
| Administration | Instrument listing, tick and lot tables, fee schedules, expiries | What can change intraday and what only between sessions |
| Resilience | Primary and standby with a replicated journal | Recovery point: no acknowledged order may be lost |
The rulebook is a product decision, and every ambiguity in it becomes a bug later. Write these down with worked examples before the first line of the hot path.
| Stage | Output | Evidence it is done |
|---|---|---|
| 1. Rulebook | Written market rules with worked examples | Test vectors: input sequences with expected output events |
| 2. Reference model | A slow, obviously correct implementation of the rules | Passes every test vector |
| 3. Engine, journal, replay | The production engine and its append-only journal | Replaying a session reproduces the event stream byte for byte; engine and reference model agree on generated sequences |
| 4. Gateway, market data, drop copy | Member-facing interfaces | A member conformance test suite, run by someone who did not write the gateway |
| 5. Failover drills | Standby takeover under load | Measured recovery time and zero lost acknowledged orders across repeated drills |
| 6. Load at the burst profile | Latency distribution per path | p99 and p99.9 from gateway in to acknowledgement out, under load sent at a fixed rate |
| 7. Member certification and launch | Members connected and certified | Mock trading sessions with real members before the first live session |
Several vendors sell exchange cores. None of those below publishes a price.
| Option | What the vendor publishes | Deployment | Price |
|---|---|---|---|
| DXmatch (Devexperts) | "Modular system built for launching exchanges and dark pools": price-time priority, market data, risk controls, admin UI; "FIX 5.0 Trading and Drop Copy"; "Opening auctions"; "sub-100-µs end-to-end order-processing latency at the 99th percentile"[1] | "RPM packages for Linux: deploy on bare metal for lowest latency or in AWS or Google Cloud"[1] | Not published[1] |
| Exberry | An "Exchange in a Box" for regulated, digitised, prediction and alternative markets; "We can adjust the service to run dedicated and shared models, and control the level of data segregation both from physical and logical aspects"[2] | "across cloud platforms such as AWS, Google Cloud and Azure, as well as bare metal and on-premises deployments"[2] | Not published[2] |
| Nasdaq Eqlipse | Sold as "fully managed services mandates where Nasdaq hosts and manages the clients' entire trading environment" or as an "AWS-hosted SaaS deployment"[3] | Nasdaq-hosted or AWS-hosted[3] | Not published[3] |
| OpenDAX (Openware) | "Open-Source Cloud-Native Digital Asset & Cryptocurrency Exchange Platform" under Apache-2.0[4] | Self-hosted[4] | Free licence; the repository's last push was 2 December 2023[4] |
| Custom build | Your rulebook, your priority rule, your order types | Where your members and your regulator need it | Build cost plus operations; no licence fee or revenue share |
License when your market is standard for its asset class and your advantage is membership, listings or distribution. Build when the rulebook is unusual, when latency at your members' sockets is what you compete on, or when a per-volume or managed-service fee would outgrow the cost of running your own team. The same choice for a crypto venue, with the kits priced side by side, is on white-label exchange vs own matching engine and HollaEx vs OpenDAX.
About amBrain
A member gateway, a sequencer, pre-trade checks, market data and drop copy, market phases and auctions, a post-trade interface, a surveillance feed, administration tools, and a standby that takes over without losing acknowledged orders.
Price-time is the common rule for order-driven markets, and vendor engines such as DXmatch document a "Price-time priority algorithm"[1]. Pro-rata or hybrid rules suit some derivatives markets and change the book's data structures, so decide before the engine is written.
Against a written rulebook with test vectors, a slow reference model run on the same inputs, deterministic replay of recorded sessions, and failover drills under load. The design article covers the replay harness and the invariants it checks.
License when your rules are standard and time to market matters more than control; none of the vendors above publishes a price, so compare quotes on the same rulebook[1][2][3]. Build when the rulebook, the latency at the member's socket or the fee structure is your product. Where to start with your own trading platform covers the decisions that come before either.
Product and company names are trademarks of their respective owners and are used only to identify their products. No vendor named here reviewed or endorsed this page.
Related