Order Matching Logic
Order matching logic is the set of rules that a matching engine uses to determine which orders get filled first. The most common rule is price-time priority, where the best price is filled first, and if prices are equal, the order that arrived first gets priority.
Some exchanges use more complex logic, such as pro-rata matching, where volume is distributed among multiple participants at the same price level. The specific logic employed can significantly impact the behavior of market makers and the overall liquidity of the exchange.
For instance, pro-rata matching can encourage larger orders, while price-time priority favors speed and early entry. Understanding the matching logic is crucial for high-frequency traders and market makers who need to optimize their order placement to maximize fill rates.
It defines the competitive landscape of the order book. Because this logic is embedded in the exchange's code, it is a permanent feature of the trading environment that participants must adapt to.
It is the fundamental algorithm governing trade execution.