How an exchange fills a queue: first in, first out, allocation and pro rata
How an exchange splits a trade across the orders resting at one price, and the match algorithms CME uses to do it.
When an incoming order trades at a price where several orders rest, the exchange has to decide which of them fill and by how much. The rule it follows is the product's match algorithm. Most rules build on two ideas: time, where the oldest order fills first, and size, where every order takes a share in proportion to its quantity.
Take three orders resting at one price, the front of the queue first: 10, 30 and 60 contracts. An incoming order trades 20 of them, and each rule splits the 20 its own way:
tradedleft the book ✕top orderpro rataFIFO
| order | top order | pro rata share | FIFO | fills |
|---|---|---|---|---|
| 1st · 10 | 0 | 20 × 10 / 100 = 2 → 2 | 0 | 2 |
| 2nd · 30 | 0 | 20 × 30 / 100 = 6 → 6 | 0 | 6 |
| 3rd · 60 | 0 | 20 × 60 / 100 = 12 → 12 | 0 | 12 |
| rounding leaves | 0, front first |
| order | top order | pro rata share | FIFO | fills |
|---|---|---|---|---|
| 1st · 10 | 10 | filled by its top order | 0 | 10 |
| 2nd · 30 | 0 | 10 × 30 / 90 = 3.33 → 3 | 1 | 4 |
| 3rd · 60 | 0 | 10 × 60 / 90 = 6.67 → 6 | 0 | 6 |
| rounding leaves | 1, front first |
First in, first out
Under first in, first out (FIFO), price comes first and time second. The order at the front of the queue fills before anything behind it:
tradedleft the book ✕
FIFO rewards being early, so traders race to join a queue as soon as a price appears. Most equity and futures markets match this way.
Pro rata
Under pro rata, each resting order takes a share of the trade in proportion to its size, whatever its place in the queue. Shares are rounded down, and the contracts lost to rounding fill FIFO:
tradedleft the book ✕pro rataFIFO
| order | top order | pro rata share | FIFO | fills |
|---|---|---|---|---|
| 1st · 10 | 0 | 25 × 10 / 100 = 2.50 → 2 | 1 | 3 |
| 2nd · 30 | 0 | 25 × 30 / 100 = 7.50 → 7 | 0 | 7 |
| 3rd · 60 | 0 | 25 × 60 / 100 = 15 → 15 | 0 | 15 |
| rounding leaves | 1, front first |
Pro rata rewards size over speed. Markets where many traders quote the same price, such as short term interest rate futures, often use it so that a large quote is worth showing.
Allocation
Allocation mixes the two, and first rewards the order that set the price. An order that arrives at a price better than every order resting on its side opens a new best price, and it becomes that side's top order. In SR3Z6-SR3H7, a calendar spread of SOFR futures in the bundled CME capture, the best bid is 24.5 until an order of 281 arrives at 25.0:
Exchanges reward the top order because it improved the price for everyone on the other side. When a trade reaches its price, it fills first:
fills at message 8,198 · SR3Z6-SR3H7 · trade 25.0 · seller took 100
- 730200001098225.0−25topleft the book1st of 4
- 730200001120725.0−11pro rata 9 + FIFO 2left 182nd of 4
- 730200001133025.0−32pro rataleft 683rd of 4
- 730200001145625.0−32pro rataleft 684th of 4
Each side has at most one top order, and it keeps the status until it is cancelled, grows, or a later order betters its price. A trade then fills in three steps:
- The top order fills, up to a cap if the product sets one.
- The rest splits pro rata across the resting orders, rounded down; a share below a minimum becomes zero.
- The contracts left over from rounding fill FIFO.
Take this setup:
- four orders resting at one price, front first: 10, 30, 60 and 5 contracts
- the 10 is the top order
- the minimum share is 2 contracts
- an incoming order trades 30
tradedleft the book ✕top orderpro rataFIFO
| order | top order | pro rata share | FIFO | fills |
|---|---|---|---|---|
| 1st · 10 | 10 | filled by its top order | 0 | 10 |
| 2nd · 30 | 0 | 20 × 30 / 95 = 6.32 → 6 | 2 | 8 |
| 3rd · 60 | 0 | 20 × 60 / 95 = 12.63 → 12 | 0 | 12 |
| 4th · 5 | 0 | 20 × 5 / 95 = 1.05 → 1, under 2 → 0 | 0 | 0 |
| rounding leaves | 2, front first |
The top order fills first whatever its size. Here the 25 opened the price, so it takes all of its 25 before the two orders of 100 get anything:
tradedleft the book ✕top orderpro rataFIFO
| order | top order | pro rata share | FIFO | fills |
|---|---|---|---|---|
| 1st · 25 | 25 | filled by its top order | 0 | 25 |
| 2nd · 29 | 0 | 75 × 29 / 229 = 9.50 → 9 | 2 | 11 |
| 3rd · 100 | 0 | 75 × 100 / 229 = 32.75 → 32 | 0 | 32 |
| 4th · 100 | 0 | 75 × 100 / 229 = 32.75 → 32 | 0 | 32 |
| rounding leaves | 2, front first |
Market makers with a reserved share
A product needs someone quoting it all day, or a trader who arrives when the market is quiet finds no price to trade at. So exchanges appoint designated market makers: firms that commit to quote a product on both sides, a bid and an ask no further apart than a set spread and for at least a set size, for most of the trading session.
What the market maker gets in return differs by exchange. Eurex and Euronext pay theirs mostly in lower fees. Others pay in fills: when a trade reaches the price the market maker quotes, a set share of it goes to the market maker first, and only the rest fills by the usual rule. Cboe's options exchange calls this share a participation entitlement (Rule 5.32 of its rule book). CME calls its market makers lead market makers (LMM): each LMM takes a set percentage of the incoming order before the remaining quantity fills FIFO or pro rata.
Your own queue
Change the orders resting at the price, the trade and the rule, and the figure and its arithmetic follow:
tradedleft the book ✕top orderpro rataFIFO
| order | top order | pro rata share | FIFO | fills |
|---|---|---|---|---|
| 1st · 10 | 10 | filled by its top order | 0 | 10 |
| 2nd · 30 | 0 | 10 × 30 / 90 = 3.33 → 3 | 1 | 4 |
| 3rd · 60 | 0 | 10 × 60 / 90 = 6.67 → 6 | 0 | 6 |
| rounding leaves | 1, front first |
A larger order takes the whole price and walks on to the next. Build a book and send orders through it to see each price it reaches fill by its rule.
At CME
CME Globex names each product's algorithm by one letter in MatchAlgorithm (FIX tag 1142), sent in the instrument definition (MDInstrumentDefinitionFuture54 for a future). If an incoming order's quantity equals or exceeds all the displayed quantity at a price, CME fills the whole level FIFO, whatever the algorithm:
tradedleft the book ✕FIFO
| Letter | Algorithm | Order of fills |
|---|---|---|
| F | first in, first out | oldest order at the price first |
| A | allocation | top order, then pro rata (minimum 2 lots), then FIFO for the remainder |
| C | pro rata | pro rata (minimum 2 lots), then FIFO for the remainder |
| T | first in, first out with LMM | lead market makers take a set share, then FIFO |
| S | first in, first out with top order and LMM | top order, then lead market makers, then FIFO |
| K | configurable | ordered steps configured per product: top order, LMM, FIFO/pro rata split, leveling (at most 1 lot each to orders rounded to zero), then FIFO |
| O | threshold pro rata | top order (subject to product min/max), then pro rata above a configurable minimum, then FIFO |
| Q | threshold pro rata with LMM | as O, with LMM share after top order |
| V | institutional prioritization | FIFO within the aggressor's institution group, then FIFO for orders without an institution group |
The Market Data Visualizer comes with a CME capture to try this on: a recording of CME's MDP 3.0 market data feed, generated rather than recorded, of 150 seconds of a fictional Friday, 4 December 2026. It holds the December 2026 E-mini S&P 500, Micro E-mini S&P 500, E-mini Nasdaq-100 and Micro E-mini Nasdaq-100 futures, which use F, and six SOFR futures with their calendar spread SR3Z6-SR3H7, which use A. SOFR packs and bundles at CME use F.
CME's market data feed, MDP 3.0, has no top order field, so a reader of a capture finds the top order the way CME's matching steps define it. An order becomes top when it enters, or moves its price, to a price that betters its side's best: in the feed, an order added in MDIncrementalRefreshOrderBook47 (MDUpdateAction New) or in the order entries of MDIncrementalRefreshBook46 (OrderUpdateAction New) above every bid, or below every offer, resting on its side. It stays top through a smaller quantity, such as a partial fill, and loses the status when its quantity grows, when it moves to a price that betters nothing, when it is cancelled, or when a later order on its side becomes top. A display quantity order is top only with its first slice. A trade then shows it: the top order's entry in NoOrderIDEntries takes all it had, or the whole trade, before anyone's pro rata share.
Each trade reaches the feed as MDIncrementalRefreshTradeSummary48: one entry per trade in NoMDEntries, then one entry per resting order it filled in NoOrderIDEntries, with the order's OrderID and the contracts it traded in LastQty. That second group shows how the exchange split the trade:
// semantic type X · since v9
// MDIncrementalRefreshTradeSummary
MDIncrementalRefreshTradeSummary48 :: message @48 {
// Start of event processing time in number of nanoseconds since Unix epoch
TransactTime: uInt64 :: type uint64; // uInt64uInt64; @60
// Bitmap field of eight Boolean type indicators reflecting the end of updates for a given Globex event
MatchEventIndicator: MatchEventIndicator :: set uInt8 // 1 B bit setMatchEventIndicator; @5799
// padding
// Number of Trade Summary entries
NoMDEntries: group @268 {
// Trade price
MDEntryPx: PRICE9 :: composite // Price with constant exponent -9PRICE9; @270
// Consolidated trade quantity
MDEntrySize: Int32 :: type int32; // int32Int32; @271
// Security ID as defined by CME
SecurityID: Int32 :: type int32; // int32Int32; @48
// Sequence number per instrument update
RptSeq: uInt32 :: type uint32; // uInt32uInt32; @83
// The total number of real orders per instrument that participated in a match step within a match event
NumberOfOrders: Int32 :: type int32; // int32Int32; @346
// Indicates which side is the aggressor or if there is no aggressor
AggressorSide: AggressorSide :: enum uInt8NULL // 1 BAggressorSide; @5797
// Market Data update action
MDUpdateAction: MDUpdateAction :: enum uInt8 // 1 BMDUpdateAction; @279
// Market Data entry type
MDEntryType: MDEntryTypeTrade :: type char const; // MDEntryTypeTradeMDEntryTypeTrade const = '2'; @269
// Market Data Trade entry ID
MDTradeEntryID: uInt32NULL :: type uint32 optional; // uInt32 optionaluInt32NULL optional; @37711
// padding
}
// Number of OrderID entries
NoOrderIDEntries: group @37705 {
// Unique order identifier as assigned by the exchange
OrderID: uInt64 :: type uint64; // uInt64uInt64; @37
// Quantity bought or sold on this last fill
LastQty: Int32 :: type int32; // int32Int32; @32
// padding
}
}
PRICE9 :: composite {
mantissa: int64;
exponent :: -9;
}In the Market Data Visualizer
The Market Data Visualizer replays a capture as a book: a row per price, and in each row a block per resting order, the front of the queue next to the price. Point at a block and its order card opens beside it: a list of what the book knows of that order, such as its id, size, place in the queue, the messages that added and changed it, and its fills. Its match row names the instrument's algorithm by its letter and name, such as A · allocation; the instrument card, which opens under an instrument in the replay's list of instruments, has the same in its match algorithm row. A letter CME's product reference does not name shows alone.
The Market Data Visualizer follows the top order as the section above describes, from the orders it saw added, changed and deleted. On an allocation book the order card of a top order has a top order row with the message that made it top. A book that joined the capture from a snapshot cannot tell which of the snapshot's orders is top: its cards say unknown until an order betters the side's best, or a trade at the best price fills the front of the queue in a way only one answer explains.
Open SR3Z6-SR3H7 where the top order arrives
While the replay is paused, the book marks the fills of the last step on the queue as it was before the trade: the traded part of an order that rests on is solid, and an order that left the book is hatched. The Fills pane beside the books names each fill and its place in the queue, and on an allocation book the step that gave it: top for the top order, pro rata or FIFO, each with its contracts when two steps filled one order, or unknown where splitting the trade over the queue the Market Data Visualizer holds does not give the fills the trade lists. The trade at message 8,195 lists those steps under its ladder.
fills at message 6,975 · MESZ6 · trade 7816.75 · buyer took 55
- 73020000078557816.75−42left the book1st of 10
- 73020000089257816.75−10left the book2nd of 10
- 73020000078807816.75−3left 43rd of 10
fills at message 8,220 · SR3Z6-SR3H7 · trade 25.0 · seller took 50
- 730200001120725.0−6pro rata 5 + FIFO 1left 121st of 3
- 730200001133025.0−22pro rataleft 462nd of 3
- 730200001145625.0−22pro rataleft 463rd of 3
Open MDIncrementalRefreshTradeSummary48 in the CME schema
Read on in order books by price and by order and replay CME order books.
Sources
- https://cmegroupclientsite.atlassian.net/wiki/spaces/EPICSANDBOX/pages/457218479/Supported+Matching+Algorithms
- https://cmegroupclientsite.atlassian.net/wiki/spaces/EPICSANDBOX/pages/457218521/CME+Globex+Matching+Algorithm+Steps
- https://cmegroupclientsite.atlassian.net/wiki/spaces/EPICSANDBOX/pages/457323107/MDP+3.0+-+Message+Specification
- https://www.eurex.com/ex-en/trade/market-making-and-liquidity-provisioning
- https://www.euronext.com/en/trade/join-euronext/liquidity-provision
- https://cdn.cboe.com/resources/regulation/rule_book/C1_Exchange_Rule_Book.pdf
Reviewed by Structure on 2026-11-25. Last changed 2026-11-25.