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.

View as Markdown

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:

front
before103060
FIFO−10 ✕−102060
10100
pro rata8−624−1248
2612
allocation−10 ✕26−654
103 + 16

tradedleft the book ✕top orderpro rataFIFO

pro rata, 20 traded
ordertop orderpro rata shareFIFOfills
1st · 10020 × 10 / 100 = 2 → 202
2nd · 30020 × 30 / 100 = 6 → 606
3rd · 60020 × 60 / 100 = 12 → 12012
rounding leaves0, front first
allocation, 20 traded
ordertop orderpro rata shareFIFOfills
1st · 1010filled by its top order010
2nd · 30010 × 30 / 90 = 3.33 → 314
3rd · 60010 × 60 / 90 = 6.67 → 606
rounding leaves1, front first
The queue before the trade, then the same 20 contracts under each rule, the 10 as allocation's top order.

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:

front
before103060
FIFO−10 ✕−102060
10100

tradedleft the book ✕

First in, first out, 20 traded. The 30 keeps its place at the front with 20 left.

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:

front
before103060
pro rata7−723−1545
2 + 1715

tradedleft the book ✕pro rataFIFO

pro rata, 25 traded
ordertop orderpro rata shareFIFOfills
1st · 10025 × 10 / 100 = 2.50 → 213
2nd · 30025 × 30 / 100 = 7.50 → 707
3rd · 60025 × 60 / 100 = 15 → 15015
rounding leaves1, front first
Pro rata, 25 traded.

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:

ordsizepricesizeord
27.02225100332554
26.5794950092
26.058898410012768100
25.5
25.0
32105010410224.5
5025071744824.0
212100332223.5
Before. The best bid is 24.5.

Open at this message

ordsizepricesizeord
27.02225100332554
26.5794950092
26.058898410012768100
25.5
281128125.0
32105010410224.5
5025071744824.0
212100332223.5
After. The order of 281 at 25.0 stands above every other bid: it opened the price, so it is the top order.

Open at this message

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:

ordsizepricesizeord
27.02124100332554
26.51,11510500233150
26.0487684100127100
25.5
186868−3268−3268315425.0
505085318524.5
250429024.0
250500696823.5

fills at message 8,198 · SR3Z6-SR3H7 · trade 25.0 · seller took 100

  1. 730200001098225.0−25topleft the book1st of 4
  2. 730200001120725.0−11pro rata 9 + FIFO 2left 182nd of 4
  3. 730200001133025.0−32pro rataleft 683rd of 4
  4. 730200001145625.0−32pro rataleft 684th of 4
A seller takes 100 at 25.0. Earlier trades took the top order down to 25, and it fills those 25 before any other bid gets a contract; the other 75 go to the orders behind it.

Open at this message

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:

  1. The top order fills, up to a cap if the product sets one.
  2. The rest splits pro rata across the resting orders, rounded down; a share below a minimum becomes zero.
  3. 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
front
before1030605
allocation−10 ✕−622−12485
106 + 2120

tradedleft the book ✕top orderpro rataFIFO

allocation, 30 traded
ordertop orderpro rata shareFIFOfills
1st · 1010filled by its top order010
2nd · 30020 × 30 / 95 = 6.32 → 628
3rd · 60020 × 60 / 95 = 12.63 → 12012
4th · 5020 × 5 / 95 = 1.05 → 1, under 2 → 000
rounding leaves2, front first
Allocation, 30 traded, the 10 as the top order and 2 contracts as the minimum share.

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:

front
before2529100100
allocation−25 ✕−918−3268−3268
259 + 23232

tradedleft the book ✕top orderpro rataFIFO

allocation, 100 traded
ordertop orderpro rata shareFIFOfills
1st · 2525filled by its top order025
2nd · 29075 × 29 / 229 = 9.50 → 9211
3rd · 100075 × 100 / 229 = 32.75 → 32032
4th · 100075 × 100 / 229 = 32.75 → 32032
rounding leaves2, front first
The 25 is the top order and fills whole first; the other 75 split pro rata across 229 contracts, and the 2 that rounding leaves go to the 29 at the front.

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:

front
before103060
allocation−10 ✕26−654
103 + 16

tradedleft the book ✕top orderpro rataFIFO

allocation, 20 traded
ordertop orderpro rata shareFIFOfills
1st · 1010filled by its top order010
2nd · 30010 × 30 / 90 = 3.33 → 314
3rd · 60010 × 60 / 90 = 6.67 → 606
rounding leaves1, front first
It starts from the example: 10, 30 and 60 resting, 20 traded by allocation with the 10 as the top order.

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:

front
before103060
allocation−10 ✕−30 ✕−60 ✕
103060

tradedleft the book ✕FIFO

Allocation at CME, 100 traded: the incoming order takes the whole price, so the level fills FIFO, with no top order or pro rata step.
CME match algorithms by MatchAlgorithm letter
LetterAlgorithmOrder of fills
Ffirst in, first outoldest order at the price first
Aallocationtop order, then pro rata (minimum 2 lots), then FIFO for the remainder
Cpro ratapro rata (minimum 2 lots), then FIFO for the remainder
Tfirst in, first out with LMMlead market makers take a set share, then FIFO
Sfirst in, first out with top order and LMMtop order, then lead market makers, then FIFO
Kconfigurableordered steps configured per product: top order, LMM, FIFO/pro rata split, leveling (at most 1 lot each to orders rounded to zero), then FIFO
Othreshold pro ratatop order (subject to product min/max), then pro rata above a configurable minimum, then FIFO
Qthreshold pro rata with LMMas O, with LMM share after top order
Vinstitutional prioritizationFIFO 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.

Open the CME capture

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;
}
MDIncrementalRefreshTradeSummary48 in the CME MDP 3.0 SBE schema, as the Market Data Visualizer's text view writes it

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.

ordsizepricesizeord
7817.254915541014
7817.006014101024
7816.753884431085−42 ✕
7816.50
4235307816.25
61310105407816.00
891010510820837815.75
8141010101028987815.50

fills at message 6,975 · MESZ6 · trade 7816.75 · buyer took 55

  1. 73020000078557816.75−42left the book1st of 10
  2. 73020000089257816.75−10left the book2nd of 10
  3. 73020000078807816.75−3left 43rd of 10
First in, first out in MESZ6: a buyer takes 55 contracts at the best ask, 7816.75, from the front of the queue.

Open at this message

ordsizepricesizeord
27.02124100332554
26.51,11510500233150
26.0487684100127100
25.5
124646−2246−2246310425.0
505085318524.5
250429024.0
250500696823.5

fills at message 8,220 · SR3Z6-SR3H7 · trade 25.0 · seller took 50

  1. 730200001120725.0−6pro rata 5 + FIFO 1left 121st of 3
  2. 730200001133025.0−22pro rataleft 462nd of 3
  3. 730200001145625.0−22pro rataleft 463rd of 3
The next trade at 25.0 has no top order: the order that opened the price left the book at message 8,195. A seller takes 50 of the 154 contracts, so each order fills about a third of its size, wherever it stands; the 1 contract rounding leaves goes to the front.

Open at this message

Open MDIncrementalRefreshTradeSummary48 in the CME schema

Read on in order books by price and by order and replay CME order books.

Sources

Reviewed by Structure on 2026-11-25. Last changed 2026-11-25.