What it means
Every trade needs two sides, a buyer and a seller agreeing on a price. On a modern exchange, nobody phones around to find the other side.
Orders flow into an electronic order book, and the matching engine continuously pairs compatible bids and asks according to published rules. The most common rule is price-time priority, often called FIFO.
The best price wins first, and among orders at the same price, the earliest one is matched first. This rewards investors for showing their interest early and posting competitive prices.
Other algorithms exist for different markets. Pro-rata matching, used in some futures markets, splits a large incoming order among all resting orders at the best price in proportion to their size.
That approach suits markets where big participants provide most of the liquidity. Matching can be contrasted with request-for-quote trading, where a customer asks specific dealers for a price and trades bilaterally.
Order matching is anonymous and many-to-many: the exchange stands between strangers, and neither side knows or cares who took the other side. The quality of matching matters to everyone in the market.
Fast, accurate matching supports price discovery, keeps spreads tight and lets large orders execute fairly. The rise of high-frequency trading has pushed matching times from seconds to microseconds, and exchanges invest heavily in engine capacity.
For a business leader, matching orders sits behind every market transaction the company touches, from a share buyback to a commodity hedge. The rules of the venue determine how and at what price those orders actually fill.
In practice
Real-world examples.
Example
An investor bids for 500 shares at $20.00 while a seller offers 500 at $20.00. The matching engine pairs them instantly, and both receive confirmation of the trade at the agreed price. Neither party learns the identity of the other.
Example
Three traders hold bids at the same best price, placed at different times. Under price-time priority, a new sell order fills the earliest bid first, then the second, then the third. A trader who joined the queue late may receive only a partial fill or none at all.
Example
In a pro-rata futures market, a 500-lot sell order arrives against resting bids of 300 and 700 lots at the best price. The order splits in proportion, with 150 lots going to the first bidder and 350 to the second. A large resting order therefore captures more of each incoming trade than it would under FIFO.
Formula
Calculation
Under FIFO, fill order = best price, then earliest timestamp. Under pro-rata, each resting order's fill = incoming quantity x (resting order size / total size at best price).
Worked example: a 500-unit sell order meets resting bids of 300 and 700 units at the same best price, 1,000 units in total. Under pro-rata, the first bidder receives 500 x 300 / 1,000 = 150 units and the second receives 500 x 700 / 1,000 = 350 units, and 150 + 350 = 500 units, so the incoming order is fully filled. Under FIFO, the same order fills the earliest bid first: if the 300-unit bid arrived first, it receives 300 units and the 700-unit bid receives the remaining 200 units.Case study
Seen in the real world.
Fictional example: Aldergate Commodities, an imagined food processor, hedged its wheat purchases on a futures exchange. Its treasurer never thought about matching until a large hedge executed at two noticeably different prices within the same second. The broker explained that the exchange used a pro-rata algorithm: the company's order had been split proportionally among several resting sellers at the best price, and a second tranche filled one tick lower as the book shifted. Understanding the venue's matching rules changed how the fictional treasurer placed orders afterwards, using smaller staged orders in quiet sessions rather than one large order at the open.
The fictional finance team also added the exchange's published matching rules to its hedging policy, so that new staff would know why fills could differ from the quoted price on screen. It reviewed fill reports monthly against the order book snapshots the broker supplied. Every detail of the story is invented.
Watch out
Common mistakes.
- Assuming all exchanges match orders the same way, when FIFO, pro-rata and hybrid algorithms produce very different fill patterns.
- Believing a market order guarantees a single price, when it fills against successive levels of the order book until the quantity is complete.
- Blaming brokers for poor fills that actually follow from the exchange's published matching rules and the state of the order book.
Questions
People also ask.
What is the order book?
It is the exchange's live list of outstanding buy and sell orders for a security, organised by price and time. The matching engine works through it continuously, pairing compatible orders as new ones arrive.
What is the difference between FIFO and pro-rata matching?
FIFO fills the earliest order at the best price first. Pro-rata splits an incoming order among all resting orders at the best price in proportion to their size, favouring large liquidity providers over early ones.
How does matching differ from request-for-quote trading?
Order matching is anonymous and many-to-many through the exchange's book. Request-for-quote is bilateral: a customer asks chosen dealers for a price and deals directly with the one it picks.
From the founder's library

Take it further with the book.
Build your financial confidence beyond this definition. Shihan's full-length guide, Accounting Fundamentals, takes the same plain-English approach and turns it into a complete, practical playbook for non-finance managers, business owners and students - with chapter-end quiz answers and presentation slides included.
25% off with code MMHQ25, applied at checkout. Priced in USD - checkout may show the equivalent in your local currency.
View the book and save 25%Related
