Order matching engine
An order matching engine is the core software of a trading venue that pairs incoming buy and sell orders according to defined rules and executes the resulting trades. It maintains the order book and continuously checks whether any bid and ask overlap in price so a match can occur.
Most engines follow price-time priority: better-priced orders are filled first, and among equal prices, the one entered earliest takes precedence. The engine records executions, updates the book, and broadcasts the changes. A common misconception is that matching is arbitrary or discretionary; it follows deterministic, published rules, and its speed and fairness are central to how a venue operates.