How Exchanges Allocate Limit Orders at the Best Price
Summary
The document explains how incoming market orders are matched against resting limit orders. Exchanges generally prioritize the best available price, then apply venue-specific tie-break rules. The examples include time priority (FIFO), pro-rata allocation based on displayed size, priority for public over hidden orders, and special parity or market-maker incentives. It also describes how US equity routing relates to the national best bid and offer, while noting that routing and enforcement can be complicated.
The responses emphasize that matching rules differ by exchange and product, so traders must check the applicable venue rulebook. One answer notes that placing orders in advance can help build queue position at prices away from the market, a practice described as stacking the book, though orders may need active management as prices move. The discussion is explanatory rather than empirical and does not quantify the strategy’s costs or likelihood of execution.
Key ideas
- Price priority generally determines which level of the book receives an incoming market order first.
- At a given price, exchanges may use FIFO, pro-rata allocation, parity, or other rules.
- Some venues give public orders priority over hidden orders or provide special incentives.
- Matching and routing rules depend on the exchange and product.
- Placing resting orders early can improve queue position under applicable allocation rules.
Tags
Full text
# How are limit orders selected from the order book? # How are limit orders selected from the order book? When someone places a market order, which order(s) from the limit order book are selected to fill that? If I place a limit order to buy at the highest bid, I'm bidding the same as the other highest bids, so when market orders to sell come through get matched with highest bids, how are bids selected? Is it random, in order by time, size, or another mechanism? If it is by time like FIFO, let's say I placed many limit orders long in advance at prices well out of the money. Could I get myself to the top of the queue at all these prices just by placing my orders anticipating a possible drop? ## Answer by Ryogi (score 26) https://quant.stackexchange.com/a/2279 This is determined through order precedence rules. In most markets, these are - Public order precedence: public orders have precedence over hidden orders. As I pointed out before, rules for some futures markets can be quite different (see this answer). The pro-rata allocation used in some futures markets is sometimes referred to as size precedence: when two or more orders are at parity (according to the enforced priority rules) orders fill in proportion to sizes. Let me add that precedence across exchanges is determined by Regulation NMS. The NBBO (National best bid and offer) for a stock is the best bid or offer sent by a market center to the SIP (Security Information Processor). This best price has the precedence across exchanges, and market orders should be routed towards the venue which displays the NBBO. In practice this is hard to enforce (see Nanex on this and the now-banned flash orders). ## Answer by chrisaycock (score 17) https://quant.stackexchange.com/a/2281 All exchanges allocate to best price. This is by law in the US, and it's unimaginable that an exchange would do otherwise in other jurisdictions. As for tie-breaks, there are two possibilities for public orders: - Pro-rata: larger quote sizes get more of an incoming market order; common for futures and options exchanges, plus the PSX equities exchange Once the public orders are exhausted at the best price, the exchange may fill hidden limit orders. (Note that not every exchange allows hidden limit orders.) Some exchanges also incentivize the market maker who established the new best price. That is, in a pro-rata allocation, the market maker who has set a new price that becomes the best may receive a larger share of an incoming market order than normal. Finally, some exchanges have parity rules. On the NYSE, for example, an order is usually allocated equally among the designated market maker, the first-come floor broker, and the first-come limit order from SuperDOT. So it should be clear from the above that every exchange has its own rules for allocation; there is no one true path that every venue follows. ## Answer by user508 (score 12) https://quant.stackexchange.com/a/2280 As RYogi indicated, this depends on the exchange and product type. e.g. here is a summary of the matching algorithms at the CME The answer to the second part of your question is yes. Even in a market like the Eurodollar futures -- which is mostly pro-rata, but has a FIFO component -- a common strategy is to "stack the book." So that you will be first in queue. This usually involves hiring a night clerk to pull orders as the market moves. ;-)
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.