Market Microstructure: How Orders Actually Get Executed
Market microstructure is the study of how orders are processed, how prices are formed, and how trades are executed. It is the plumbing of financial markets — invisible to most investors but fundamental to understanding why prices move, why spreads exist, and why your order gets the fill it does.
1. What Is Market Microstructure?
Market microstructure sits at the intersection of finance, economics, and engineering. It studies the mechanisms and processes by which buyers and sellers come together, agree on a price, and exchange securities. While most of finance focuses on what to buy or sell, microstructure focuses on how the buying and selling actually happens.
The field emerged as a distinct discipline in the 1960s and 1970s, driven by two forces: the increasing automation of exchanges and the academic recognition that the process of trading itself has important economic consequences. The way an order is executed affects the price you pay, the cost you incur, and ultimately your investment returns. For large institutional orders, execution costs can be the difference between a profitable strategy and an unprofitable one.
The core questions of microstructure are: How are prices determined? Why do bid-ask spreads exist? How does information get incorporated into prices? What is the cost of executing a trade? How does market structure affect price efficiency and fairness? These are not abstract academic questions — they have direct implications for every trader, from the retail investor placing a market order on their phone to the hedge fund executing a multi-million-dollar algorithm.
2. Order Types: The Building Blocks
Every trade begins with an order. Understanding the basic order types is essential to understanding how markets work.
Market Orders
A market order is an instruction to buy or sell immediately at the best available price. When you place a market buy order, you are saying: “I want to buy this stock right now. I will pay whatever price the market is offering.” Market orders guarantee execution but do not guarantee price. In a liquid stock with a tight spread, the price you get will be very close to the last traded price. In an illiquid stock or during volatile conditions, the fill price can be significantly worse than expected — this is called slippage.
Limit Orders
A limit order is an instruction to buy or sell at a specified price or better. A limit buy at $50 means: “I want to buy this stock, but only if I can get it at $50 or lower.” Limit orders guarantee price but do not guarantee execution. If the stock never trades at your limit price, your order will not fill. Limit orders are the foundation of the order book: every resting bid and ask that you see on a Level 2 screen is a limit order waiting to be filled.
Stop Orders
A stop order (also called a stop-loss order) is an instruction that becomes a market order when the stock reaches a specified trigger price. A sell stop at $45 means: “If the stock drops to $45, sell it at the market.” Stop orders are primarily used for risk management — protecting against downside. The important nuance is that once triggered, a stop order becomes a market order, which means the fill price may be worse than the trigger price, especially in fast-moving or gapping markets.
A stop-limit order combines the two: it becomes a limit order (not a market order) when the trigger price is reached. This avoids the slippage risk of stop orders but introduces the risk that the order may not fill if the stock gaps through the limit price.
3. The Order Book (Level 2)
The order book, also known as Level 2 data, is the real-time display of all pending limit orders for a security. It shows the bid side (all resting buy limit orders) and the ask side (all resting sell limit orders), organized by price level.
The best bid is the highest price at which someone is willing to buy. The best ask (or best offer) is the lowest price at which someone is willing to sell. The difference between the best ask and the best bid is the bid-ask spread:
Spread = Best Ask − Best Bid
The spread is a fundamental concept in microstructure. It represents the cost of immediacy: if you want to buy right now (market order), you pay the ask. If you want to sell right now, you sell at the bid. The round-trip cost of buying and then immediately selling is the spread. In highly liquid stocks like AAPL or MSFT, the spread is typically one cent — the minimum tick size for stocks priced above $1.00 on US exchanges. In less liquid stocks, spreads can be five, ten, or fifty cents or more.
The order book also shows the depth at each price level — the total number of shares available. A bid of $50.00 with 10,000 shares means there are resting buy orders totaling 10,000 shares at that price. If you place a market sell order for 15,000 shares, the first 10,000 will fill at $50.00 and the remaining 5,000 will fill at the next bid below — say $49.99. This is why large orders experience price impact: they consume the available liquidity at each price level and push the price in the direction of the trade.
4. The Matching Engine
The matching engine is the core software system of an exchange. It receives incoming orders, compares them against the resting order book, and executes trades when a match is found. Modern matching engines process millions of messages per second with latency measured in microseconds.
US equity exchanges use price-time priority (also called FIFO — first in, first out) as the primary matching algorithm. The rules are:
- Price priority. The highest bid is matched first against incoming sell orders. The lowest ask is matched first against incoming buy orders. Better prices always have priority over worse prices.
- Time priority. Among orders at the same price, the order that arrived first is matched first. If two traders both bid $50.00, but Trader A’s order arrived 3 milliseconds before Trader B’s, Trader A gets filled first.
This is why speed matters in modern markets. High-frequency trading firms invest hundreds of millions of dollars in faster hardware, co-located servers (placed physically next to the exchange’s matching engine), and optimized network connections. Being 10 microseconds faster means your order arrives 10 microseconds earlier, which means you get time priority at the same price. In a market where millions of dollars of liquidity rest at each price level, time priority translates directly into execution probability and profit.
5. Maker-Taker: The Exchange Fee Model
Most US equity exchanges use a maker-taker fee structure. The terms refer to whether an order “makes” (adds) or “takes” (removes) liquidity from the order book:
- Maker: A limit order that rests on the book (does not immediately execute) adds liquidity. The exchange pays the maker a rebate, typically in the range of $0.0020 to $0.0032 per share.
- Taker: A market order, or a limit order that crosses the spread and immediately executes, removes liquidity. The exchange charges the taker a fee, typically in the range of $0.0028 to $0.0035 per share.
The exchange profits from the difference between the taker fee and the maker rebate. This fee structure incentivizes traders to post limit orders (providing liquidity), which tightens spreads and improves market quality. However, it also creates incentives for rebate-seeking behavior, where some participants post limit orders primarily to collect rebates rather than because they want to trade at that price.
A few exchanges use the inverted model (taker-maker), where takers receive a rebate and makers pay a fee. IEX uses a flat fee model with no rebates. The SEC has debated the impact of maker-taker pricing on market quality for years, with ongoing discussion about whether rebates distort order routing decisions.
6. US Equity Exchanges and Fragmentation
US equities do not trade on a single exchange. As of 2025, there are 16 registered national securities exchanges in the United States, including:
- NYSE (New York Stock Exchange) — the largest exchange by listed market capitalization. Historically an auction market with designated market makers (DMMs) on the trading floor, now predominantly electronic but still uses DMMs for the open, close, and for providing liquidity in less active stocks.
- Nasdaq — originally a dealer market where market makers quoted bid and ask prices. Now fully electronic with a standard matching engine. Operates three exchanges: Nasdaq, Nasdaq BX, and Nasdaq PSX.
- Cboe (formerly BATS) — operates four equity exchanges: BZX, BYX, EDGX, and EDGA. Known for competitive fee structures and fast technology.
- IEX (Investors Exchange) — founded in 2012, famous for its “speed bump” (a 350-microsecond intentional delay) designed to neutralize the speed advantage of high-frequency traders. Made famous by Michael Lewis’s 2014 book Flash Boys.
In addition to the 16 lit exchanges, US equities also trade on more than 30 dark pools (alternative trading systems that do not display their order books publicly) and through broker internalizers (wholesale market makers that execute retail orders internally rather than sending them to an exchange). This fragmentation means that the “market” for any given stock is actually a distributed network of dozens of venues, each with its own order book, fee structure, and participant mix.
7. Regulation NMS and the NBBO
Regulation National Market System (Reg NMS), adopted by the SEC in 2005 and fully implemented in 2007, is the regulatory framework that governs how US equity markets interact. Its most important provision is the Order Protection Rule (Rule 611), which requires that orders be routed to the exchange displaying the best price.
The National Best Bid and Offer (NBBO) is the best available bid price and the best available ask price across all 16 exchanges at any given moment. If NYSE’s best bid is $50.00 and Nasdaq’s best bid is $50.01, the NBBO bid is $50.01 (Nasdaq). If you send a sell market order to NYSE, NYSE is required (under Rule 611) to route your order to Nasdaq to get the better price, rather than filling it at the inferior $50.00 price on NYSE.
The NBBO is the cornerstone of the US equity market structure. It ensures that, in theory, every investor receives the best available price regardless of which venue they send their order to. In practice, the NBBO changes thousands of times per second, and the latency between venues means that the “best price” can be stale by the time your order arrives. This staleness is one of the mechanisms that high-frequency traders exploit.
8. Payment for Order Flow (PFOF)
Payment for order flow (PFOF) is the practice where retail brokers send their customers’ orders to wholesale market makers, who pay the broker for the privilege of executing those orders. The major wholesale market makers include Citadel Securities and Virtu Financial, which together handle the majority of retail order flow in the US.
The economics are as follows: retail order flow is considered “uninformed” — retail traders are generally not trading on private information about the company. This makes retail flow less risky for market makers to trade against, compared to institutional flow which may be informed. The market maker can profit by buying at the bid and selling at the ask (earning the spread), and because retail flow is less likely to be informed, the market maker faces lower adverse selection risk. Part of this profit is shared with the broker as PFOF, and part is passed to the customer as “price improvement” — execution at a price better than the NBBO.
PFOF is controversial. Proponents argue that it enables zero-commission trading and provides price improvement to retail investors. Critics argue that it creates a conflict of interest: the broker is incentivized to route orders to the market maker that pays the most, not the one that provides the best execution. The SEC under Chair Gary Gensler scrutinized PFOF extensively and proposed rules in 2022 that would have required retail orders to be exposed to competition through auctions, though the final regulatory outcome remained in flux through subsequent administrations.
PFOF enables zero-commission trading but creates questions about whether retail investors receive truly best execution. The price improvement provided by wholesalers must be weighed against the counterfactual: what execution would the order have received if sent directly to an exchange and exposed to full competition?
9. Kyle (1985): The Seminal Model of Informed Trading
Albert Kyle’s 1985 paper “Continuous Auctions and Insider Trading,” published in Econometrica (Vol. 53, No. 6, pp. 1315–1335), is arguably the most important paper in market microstructure. It provides the foundational model for understanding how informed traders interact with market makers and how information gets incorporated into prices.
Kyle’s model has three types of participants:
- An informed trader who knows the true value of the asset (an “insider” in the model’s terminology, though the model applies to anyone with an informational advantage).
- Noise traders (also called liquidity traders) who trade for reasons unrelated to information — portfolio rebalancing, tax-loss selling, cash needs, etc.
- A market maker who sets prices based on the net order flow they observe, but cannot distinguish informed trades from noise trades.
The key insight is that the informed trader does not trade all at once. If they did, their single large trade would reveal their information immediately, and the market maker would adjust the price before the informed trader could profit. Instead, the informed trader trades gradually, spreading their trades over time and hiding them within the noise of uninformed trading. The market maker, observing the net order flow (informed + noise), updates the price based on how much net buying or selling they see.
Kyle derived a key parameter called Kyle’s lambda (λ), which measures the price impact of order flow. Specifically, λ quantifies how much the price moves per unit of net order flow. A high lambda means that each additional unit of order flow moves the price a lot — the market is illiquid and information is being incorporated aggressively. A low lambda means order flow has less price impact — the market is liquid and the market maker is less concerned about adverse selection.
Kyle, A.S. (1985). “Continuous Auctions and Insider Trading.” Econometrica, 53(6), 1315–1335. doi:10.2307/1913210
10. Glosten & Milgrom (1985): Why the Spread Exists
Published in the same year as Kyle’s model, Lawrence Glosten and Paul Milgrom’s paper “Bid, Ask and Transaction Prices in a Specialist Market with Heterogeneously Informed Traders,” published in the Journal of Financial Economics (Vol. 14, No. 1, pp. 71–100), provides the most important explanation for why bid-ask spreads exist.
Glosten and Milgrom’s model shows that the bid-ask spread is the market maker’s protection against adverse selection. Some traders are informed (they know something the market maker does not) and some are uninformed. The market maker cannot tell them apart. When an informed buyer sends a buy order, it is because the stock is worth more than the current ask — the market maker will lose money on this trade. When an uninformed buyer sends a buy order, the market maker can profit from the spread.
The market maker sets the spread wide enough that the profits from trading with uninformed traders compensate for the losses from trading with informed traders. If the proportion of informed traders increases, the market maker must widen the spread to survive. This is why stocks with more information asymmetry have wider spreads: small-cap stocks with limited analyst coverage, stocks before earnings announcements, and stocks that are the subject of insider trading investigations all tend to have wider spreads.
The Glosten-Milgrom model also explains why the spread narrows after information is released. Before an earnings announcement, the spread is wide because the market maker fears informed trading. After the announcement, the information is public, informed traders no longer have an advantage, and the spread tightens.
Glosten, L.R. & Milgrom, P.R. (1985). “Bid, Ask and Transaction Prices in a Specialist Market with Heterogeneously Informed Traders.” Journal of Financial Economics, 14(1), 71–100. doi:10.1016/0304-405X(85)90044-3
11. Dark Pools and Off-Exchange Trading
Dark pools are alternative trading systems (ATSs) that do not publicly display their order books. Unlike lit exchanges where the order book is visible to all market participants, dark pools match buyers and sellers without revealing the orders in advance. The primary purpose of dark pools is to allow large institutional orders to execute without signaling their intentions to the broader market.
If a pension fund wants to sell 2 million shares of a stock, placing a visible limit order on a lit exchange would immediately signal to the market that a large seller is present. Other participants would front-run the order — selling ahead of the large order, pushing the price down, and forcing the pension fund to sell at a worse price. By executing in a dark pool, the pension fund can find a counterparty without revealing its intentions. Dark pool trades typically execute at or near the NBBO midpoint, splitting the spread between buyer and seller.
As of 2024, approximately 40–45% of US equity volume executes off-exchange — in dark pools and through wholesale internalizers. This has raised concerns about the impact on price discovery, since prices are primarily formed on lit exchanges where the order book is visible. If too much volume migrates off-exchange, the lit markets may become less efficient at price discovery, potentially harming all market participants.
12. Why Microstructure Matters for Every Trader
You do not need to be a high-frequency trader or an academic to benefit from understanding market microstructure. Here are the practical takeaways for any market participant:
- Use limit orders, not market orders. Market orders guarantee execution but expose you to the spread and potential slippage. In all but the most urgent situations, use limit orders to control the price you pay.
- Be cautious with stops in illiquid stocks. Stop orders become market orders when triggered. In a thin order book, a triggered stop can fill far from the trigger price. Consider stop-limit orders or manual exits for illiquid positions.
- Understand that the spread is a cost. Every round trip (buy then sell) costs you at least the spread. In a stock with a $0.05 spread, trading 10 times costs you $0.50 per share in spread alone — before commissions, PFOF effects, and market impact.
- Avoid trading at the open. The first few minutes of trading have the widest spreads, the most volatile prices, and the highest proportion of informed order flow. Unless your strategy specifically targets the open, waiting 15–30 minutes for the market to settle reduces your execution costs.
- Large orders need execution management. If you are trading a meaningful fraction of a stock’s daily volume (even 1–2%), your order will have price impact. Break it into smaller pieces, use limit orders, and execute over time rather than all at once.
Market microstructure is the invisible infrastructure that determines whether your trade executes at a fair price or at a disadvantaged one. The more you understand about how orders are processed, prices are formed, and information is incorporated, the better equipped you are to navigate the market’s plumbing and avoid the hidden costs that erode returns.