Sub topic 3
Where your order goes: routing and best execution
This chapter assumes you know what market and limit orders are, what a broker does for your account, and what the bid, the ask, and the spread mean. It covers the step after you tap Buy: the broker decides where to send the order. It does not cover how a venue matches orders or how trades settle. Those come in later chapters.
Routing is a decision your broker makes
When you submit an order, you choose the side, quantity, and order type. You almost never choose the destination. The broker's order management system chooses it, using rules the broker wrote and has to defend.
Most US stocks trade on many places at once. There are over a dozen exchanges, several dozen alternative trading systems, and a handful of wholesale market makers. Each can show a different bid and ask for the same stock at the same instant. Routing is the process of picking among them.
A broker typically picks one of three approaches:
- Send everything to one or two wholesale market makers. This is common for commission-free retail brokers.
- Use a smart order router (SOR). This is software that splits and sends orders to whichever venues currently offer the best price and the best chance of a fill.
- Send to a specific exchange or alternative trading system. This is common for larger or more complex orders, and for traders who choose a destination themselves.
The venues themselves are covered in the next chapter. Here the question is how the broker chooses among them.
The reference price: the NBBO
In the US, every venue that displays quotes feeds them into shared data streams. From these, the market computes the National Best Bid and Offer (NBBO). The NBBO is the highest displayed bid and the lowest displayed ask across all the exchanges, regardless of where each sits.
Suppose these are the current quotes:
| Venue | Bid | Ask |
|---|---|---|
| Exchange A | 10.00 | 10.02 |
| Exchange B | 9.99 | 10.01 |
| Exchange C | 9.98 | 10.03 |
The NBBO is 10.00 bid and 10.01 ask. The best bid comes from Exchange A and the best ask from Exchange B. No single exchange shows both.
The NBBO matters for two reasons. It is the yardstick for judging whether your fill was good. It is also the basis of a legal rule, described next.
What the rules require
Two separate obligations apply to a US broker. They are often confused.
Best execution
FINRA Rule 5310 requires a broker to use reasonable diligence to get the most favorable price for customer orders under prevailing market conditions. The factors it weighs are:
- price, including any price improvement
- order size
- speed of execution
- likelihood of execution
- the characteristics of the order
- the trading characteristics of the stock, such as how liquid it is
- costs
The duty has some limits:
- It does not promise the best price on every single order. A quote can change between the moment the broker decides and the moment the order arrives.
- It is judged over groups of orders. The broker must review its routing "regularly and rigorously", compare alternatives, and change its practices if another venue consistently does better for similar orders.
- Price is not the only factor. A venue that fills at a slightly worse price but almost always fills may serve a customer better than one that quotes well but often rejects the order.
Order protection
Regulation NMS Rule 611 (the order protection rule) prevents a trade-through. A trade-through happens when an order executes at a price worse than a protected quote shown elsewhere. A protected quote is a displayed, automatically accessible best bid or offer at an exchange.
Under this rule, a venue cannot fill your buy at 10.02 if an exchange is showing a sellable ask at 10.01. The venue must either match that price or send the order on to that exchange.
Rule 611 only protects the top of each book, and only quotes that are displayed and automatically accessible. A hidden order, or a quote deeper in the book, has no such protection. Best execution is the broader, softer duty. Rule 611 is a narrow rule with a clear test.
Price improvement and why retail orders are valuable
Most retail orders are small, and a marketable retail order is valuable to a market maker. Marketable means it can fill immediately at the current price. A wholesale market maker can fill it from its own inventory and earn part of the spread. It also takes less risk, because retail orders tend not to be placed by traders who know something the market does not.
Because of this, wholesalers often fill retail orders at a price better than the NBBO. This is called price improvement.
Take a market buy for 100 shares when the NBBO is 10.00 bid and 10.02 ask. A wholesaler fills it at 10.015:
- The visible ask was 10.02, so the order would normally cost 100 × 10.02 = 1,002.00.
- The fill costs 100 × 10.015 = 1,001.50.
- The price improvement is 0.005 per share, or 0.50 in total.
Quotes cannot be shown in fractions of a cent for most stocks (Rule 612, the sub-penny rule). Executions can be. That is how a fill at 10.015 is legal.
Payment for order flow
Wholesalers pay brokers for the right to fill their retail orders. This is payment for order flow (PFOF). It is how many commission-free brokers earn money.
The conflict is easy to see. The broker has a duty to seek the best execution for you. It is also paid by the venue that receives your order. The payment alone does not prove your execution is bad. Wholesalers compete on price improvement as well as on payments, and studies show retail fills are often better than the NBBO. But the broker's incentive and yours can differ, and it is the reason the rules require disclosure.
Another conflict exists on the exchange side. Exchanges charge or rebate small per-share fees depending on whether an order adds liquidity or removes it. A broker's router could prefer the venue that pays the biggest rebate, not the best fill. Best execution reviews have to check for this.
Other markets handle the question differently:
- The UK has banned PFOF.
- The EU is phasing it out under its MiFIR rules, and its best execution rules ask brokers to consider "total consideration", meaning price plus costs.
- Canada restricts it.
- In the US it is legal and widespread, but disclosed.
What the broker must disclose
Two SEC rules give you data to check a broker's routing:
- Rule 606 requires brokers to publish quarterly reports showing which venues received their customers' orders, in what share, and what payments the broker received.
- Rule 605 requires market centers to publish statistics on execution quality, such as how fast they filled orders, how often they improved the price, and the gap between the quoted spread and the spread actually paid. The rule was amended in 2024 to widen who reports and what is measured.
These reports are public. They are written for researchers and regulators, but you can read the headline numbers for your own broker.
A routing path, step by step
The flow below shows a retail broker that uses a smart order router and a wholesale market maker.
The broker checks your funds, or your margin if you borrow, before anything is sent. A rejected order never reaches a venue. The broker also applies its own risk limits and, in the US, market access controls. Those exist to stop errors, such as an order for the wrong size, from reaching the market.
A simple smart order router
A real router tracks live quotes, fees, latency, and the probability of a fill. The sketch below keeps only the core idea: for a buy order, take the cheapest asks first, split across venues, and never pay more than the limit.
def route_buy(quotes, qty, limit):
"""Split a buy order across venues, cheapest ask first.
quotes: list of (venue, ask_price, ask_size).
Returns (plan, unfilled), where plan is a list of (venue, price, shares)."""
plan = []
for venue, price, size in sorted(quotes, key=lambda q: q[1]):
if qty == 0 or price > limit:
break
take = min(qty, size)
plan.append((venue, price, take))
qty -= take
return plan, qty
quotes = [
("Exchange A", 10.02, 100),
("Exchange B", 10.01, 150),
("Exchange C", 10.03, 200),
]
plan, unfilled = route_buy(quotes, qty=300, limit=10.03)
print(plan)
# [('Exchange B', 10.01, 150), ('Exchange A', 10.02, 100), ('Exchange C', 10.03, 50)]
print(unfilled) # 0
cost = sum(price * shares for _, price, shares in plan)
print(round(cost / 300, 4)) # 10.0167 average price per shareThe average price of 10.0167 is higher than the best ask of 10.01. The order is larger than the size shown at the best price, so it has to take worse prices to finish. If the limit were 10.02, the router would fill 250 shares and return 50 unfilled. Those 50 would rest as a limit order. This is also why large orders cost more per share than small ones.
Common errors and edge cases
- Assuming the NBBO is the price you will get. The NBBO is a snapshot. In a fast market, quotes change before your order arrives. A market order can fill worse than the quote you saw. A limit order prevents this, at the cost of possibly not filling.
- Assuming one venue is always best. Even a broker with a single routing partner has to show that the partner is competitive over time. A broker with a smart order router is making many separate choices, and each one can be wrong.
- Confusing price improvement with a good fill. An order filled 0.001 better than the NBBO is improved. It is not necessarily the best fill, if another venue had a much deeper quote. Rule 605 data lets you compare the two.
- Ignoring size. Routing results for 10 shares tell you little about routing for 10,000. Large orders change the price they trade at.
- Forgetting the market is open or closed. Outside regular hours, fewer venues are active, spreads are wider, and some brokers route differently or do not accept all order types.
Exercise
The NBBO for a stock is 25.00 bid and 25.03 ask. A wholesaler fills your market order to buy 200 shares at 25.024. How much price improvement did you receive in total, and why can the fill price have three decimal places when quotes cannot?
Show answer
The ask was 25.03, so you paid 25.03 − 25.024 = 0.006 less per share. For 200 shares that is 0.006 × 200 = 1.20 in total price improvement. Quotes shown to the market must be in whole cents under the sub-penny rule (Rule 612), but executions can happen at fractions of a cent, which is how price improvement is delivered.
Exercise
Why does Rule 611 not guarantee that a retail order gets the best possible price, and what other duty covers the gap?
Show answer
Rule 611 only protects the best displayed, automatically accessible quote at each exchange, so deeper quotes and hidden orders are not covered, and it only prevents trading through a better quote, not every less favorable outcome. The broader best execution duty (FINRA Rule 5310) fills the gap. It requires the broker to weigh price, speed, likelihood of execution, size, and cost, and to review its routing regularly across all orders.