Matching Orders
Matching orders is the process exchanges use to pair buy and sell orders so trades can be executed. Modern equity, options, and derivatives markets perform this task electronically using rules and algorithms that determine which orders get filled and in what order.
How order matching works
- A buy and a sell order match when their prices are compatible — typically when the bid (buy) price meets or exceeds the ask (sell) price.
- Exchanges and trading venues run automated matching engines that collect orders, prioritize them according to the venue’s rules, and execute trades when matches occur.
- Historically done on trading floors by specialists or market makers, order matching is now almost entirely electronic. Speed and accuracy matter: delays or unfair priority rules can produce worse execution prices and be exploited by high-frequency traders.
Common matching rules and algorithms
Exchanges use different algorithms to prioritize and allocate fills. Two broad categories are price-time priority (FIFO) and pro-rata allocation.
Explore More Resources
FIFO (Price-time priority)
- Orders are ranked first by price, then by the time they were entered.
- A higher-priced order always takes precedence over lower-priced orders. Among orders at the same price, the earliest order is filled first.
- Example: If a buy order for 200 shares at $90 was entered before a buy order for 50 shares at $90, the 200-share order must be filled (as far as possible) before any portion of the 50-share order is matched.
Pro‑rata (proportional allocation)
- When multiple active orders share the same price, available liquidity is allocated proportionally to each order’s size.
- Example: Two buy orders at the same price — one for 200 shares and one for 50 shares — face an incoming 200-share sell order. The sell order is split proportionally: (200/(200+50))=80% to the 200-share order (160 shares) and 20% to the 50-share order (40 shares). Both are partially filled.
Many venues use variations or hybrids of these approaches to balance speed, fairness, and liquidity incentives.
Practical implications
- Matching rules affect execution quality, order strategies, and liquidity provision. Traders design order-sending strategies around the venue’s matching logic.
- Speed advantages (e.g., high-frequency trading) can be decisive under price-time priority because being first grants priority.
- Pro‑rata rules favor larger displayed orders and can reduce incentives to “race” for time priority, but may encourage order size manipulation.
- Each exchange’s specific implementation and tie-breakers matter; traders should understand the rules where they trade.
Key takeaways
- Order matching pairs compatible buy and sell orders so trades occur; it’s central to exchange function.
- Matching is automated and governed by venue-specific algorithms that prioritize and allocate fills.
- FIFO (price-time) and pro‑rata (proportional) are the most common allocation methods, each with tradeoffs for speed, fairness, and market behavior.
- Knowledge of an exchange’s matching rules helps traders improve execution strategy and anticipate market dynamics.
Bottom line
Matching orders is the core mechanism that turns orders into trades. While the basic idea is simple — pair buyers and sellers — the details of how fills are prioritized and allocated shape market behavior, execution quality, and the incentives for different trading strategies.