How Orders Get Filled
When you click buy, your order doesn't just appear on the exchange. It travels through routing, market makers, and matching engines, affecting your fill price.
The Gap Between Clicking and Filling
From a trader’s perspective, clicking “buy” and seeing a fill confirmation feels instantaneous. The actual sequence of events between those two moments determines what price you get, and understanding it explains why fills sometimes disappoint.
Your order does not teleport to the exchange. It travels a path involving your broker, a routing decision, and one or more execution venues, each with their own incentives and mechanics.
Order Routing: Your Broker Decides
When you send an order, your broker decides where to send it. This routing decision is not random and not necessarily optimized for your fill quality; it’s influenced by commercial arrangements between your broker and the venues it routes to.
For most retail brokers, the dominant arrangement is payment for order flow (PFOF). A market maker pays the broker for the right to be the counterparty on your trade. The broker profits without charging you a commission. The market maker profits from the spread between what you buy at and what they can sell at.
This creates a structural question: is your broker routing to whoever executes best, or whoever pays most? The SEC requires brokers to seek “best execution,” but the definition of best execution is broad enough that PFOF-based routing often satisfies it.
Brokers that don’t accept PFOF, like Interactive Brokers’ IBKR Pro, route directly to exchanges and ECNs. They may charge commissions, but you get direct market access and the possibility of tighter fills.
Market Makers
A market maker is a firm that continuously quotes buy prices (bids) and sell prices (asks) in a security. They profit from the spread: buying at the bid, selling at the ask, and pocketing the difference. For this to work, they need to trade constantly and manage inventory risk.
For retail orders, market makers are often the actual counterparty. When you buy 100 shares, you’re frequently not buying from another retail trader; you’re buying from a market maker who is selling shares they hold in inventory. They later replenish that inventory by buying from others.
Large market-making firms use algorithms and co-located servers to update quotes thousands of times per second in response to price changes. This speed is how they manage the risk of holding inventory in a volatile market.
ECNs and Lit Exchanges
An ECN (Electronic Communication Network) is a venue that matches buy and sell orders directly, without a market maker in between. If you post a limit buy and another trader posts a limit sell at the same price, the ECN matches them. Both sides get the execution price they specified, and neither pays a spread to a market maker.
ECNs display their order books publicly; they’re “lit” venues. NYSE and Nasdaq are the major lit exchanges; several ECNs operate alongside them. Orders routed to lit exchanges contribute to the publicly visible bid and ask.
Some trading is “dark,” executed off-exchange in dark pools that don’t display pre-trade quotes. Institutions use dark pools to execute large orders without moving price. Retail traders generally don’t interact with dark pools directly.
The Matching Engine
At every exchange and ECN sits a matching engine, software that processes incoming orders and pairs buyers with sellers. The matching engine follows strict rules: price priority first (the best bid and best ask get matched first), then time priority (at the same price, earlier orders get filled first).
When you place a market order, the matching engine fills it against the best available limit orders on the opposite side of the book. When you place a limit order, your order sits in the book until the market price reaches it, at which point it’s matched with an incoming order.
The matching engine operates in microseconds. By the time your order arrives, even via a fast broker, conditions may have changed from what you saw on your screen.
Price Improvement and Disimprovement
Price improvement means your order fills at a better price than the displayed quote. If the ask is $50.03 and you buy at $50.01, you’ve received price improvement of two cents per share. Market makers may offer this to attract order flow; it costs them something, but it also justifies claiming best execution.
Price disimprovement (also called slippage) is the opposite: you get a worse fill than expected. This happens when:
- The displayed quote changed between when you saw it and when your order arrived.
- Your market order consumed all available shares at the best price and started filling at the next price level.
- You’re trading a thinly-listed security with a wide spread and low depth.
Slippage is not a bug or a broker error; it’s a natural consequence of markets moving in real time. Large orders in illiquid names will reliably experience it. Market orders during fast-moving news events will too.
Why Your Fill Differs From the Quote
The quote you see on your screen is the best current bid and ask, but it’s a snapshot, not a guarantee. Several things can cause your fill to differ:
- Latency: The quote on your screen is already slightly stale by the time you act on it.
- Order size: The displayed size at the best price might be smaller than your order, forcing the remainder to fill at the next price level.
- Routing delay: Each hop in the routing process takes time, during which price can move.
- Market conditions: High volatility widens spreads and increases slippage.
For most small orders in liquid stocks, the fill will be at or very close to the displayed price. For large orders, options on wide spreads, or thinly-traded securities, the divergence can be significant.
Practical Implications
Use limit orders for most planned entries. You specify the maximum price you’ll pay (or minimum you’ll accept), eliminating the risk of being filled at a price you didn’t intend. The cost is that you might not get filled at all if the market doesn’t reach your limit.
Reserve market orders for situations where execution certainty matters more than price precision, exiting a position quickly in a liquid name, for instance.
Monitor your broker’s execution quality statistics if they publish them. Most U.S. brokers file quarterly reports on fill rates, speed, and price improvement. The data isn’t glamorous, but it tells you whether your broker’s routing is actually working in your favor.
Common Misconceptions
“The displayed price is what I’ll pay.” The displayed price is the last known best quote. Between seeing it and your order arriving, it can change.
“PFOF always hurts me.” For small retail orders in highly liquid stocks, PFOF-based execution often provides price improvement over the displayed quote. The concern is more significant for larger orders and less-liquid names.
“Faster internet means better fills.” The latency that matters is between your broker’s servers and the exchange, not your home connection to your broker. A faster router won’t close that gap.
Key Takeaways
- Your broker chooses where to route your order: that choice affects your fill price more than most traders realize.
- Payment for order flow means market makers pay for the right to execute your trades; this drives commission-free trading but creates routing conflicts.
- Market makers profit from the spread between bid and ask; they are your counterparty on most retail trades.
- ECNs match buyers and sellers directly on lit order books; better for price discovery, but may require paying commissions.
- Slippage is normal; it reflects the difference between a displayed quote and actual execution, magnified by order size, volatility, and liquidity.