Skip to main content
Module 17 · Stocks — Deep Dive

How Stocks Actually Trade

5 min readYou'll be able to Follow an order from your click to your fill — through the broker, the trading venue and settlement — and choose the order type and timing that protect your price.

When you buy a stock you are not buying from the company; you are buying from another investor, through a chain of firms that match your order with someone on the other side. The price you get depends on the order type you choose, how many shares are waiting at each price, and when you trade. Once you see the order book as a queue of real buy and sell orders, slippage, spreads and bad fills stop being mysteries and become costs you can manage.

How Stocks Actually Trade
Quick demo

This is a hypothetical order book for a stock. Buyers wait on the left, sellers on the right.

Bid sizeBidAskAsk size
300$50.00$50.02200
400$49.99$50.03200
500$49.98$50.05300

The spread is $50.02 − $50.00 = $0.02. You send a market order to buy 500 shares. It fills against the sellers in price order:

  • 200 shares at $50.02 = $10,004
  • 200 shares at $50.03 = $10,006
  • 100 shares at $50.05 = $5,005

Total: $25,015 for 500 shares, an average of $50.03. You expected about $50.02, so you paid roughly $5 more than the top-of-book price suggested ($0.01 × 500). On a thin stock or a fast open the gap can be far larger. A limit order to buy 500 at $50.02 would have bought 200 shares immediately and waited for the rest, never paying more than $50.02.

The path of an order

  1. You enter an order in your broker's platform.
  2. Your broker checks you have the cash or margin, then routes the order. Routing means choosing where to send it: an exchange, an alternative trading system, or a market-making firm that fills retail orders.
  3. The venue matches your order with an opposite order, and the trade is reported publicly within seconds.
  4. Clearing and settlement happen behind the scenes: a clearinghouse guarantees the trade, and on the settlement date the shares and cash formally change hands.

Exchanges and other venues

US stocks are not traded in one place. They trade on several registered exchanges, such as the New York Stock Exchange and Nasdaq, and also on alternative trading systems (some of which hide their order books, often called "dark pools") and through wholesale market makers that fill many retail orders directly.

Fragmentation is held together by rules. Under the SEC's Regulation NMS, venues publish their best quotes, these are combined into the national best bid and offer (NBBO), and trades generally must not happen at prices worse than the best displayed quotes elsewhere. Many retail market orders are filled at or slightly better than the NBBO; that improvement is called price improvement.

Reading the quote

  • Bid: the highest price someone will pay right now.
  • Ask (or offer): the lowest price someone will sell for right now.
  • Spread: ask minus bid. It is a cost you pay every round trip.
  • Size: how many shares are shown at each price. A small size at the best price means a large order will reach deeper, worse prices.
  • Last: the price of the most recent trade. It can be stale; the bid and ask tell you where you can actually trade now.

Large, heavily traded stocks often have a spread of a single cent. Small, thinly traded stocks can have spreads of several percent of the price.

$0.02
Spread in the demo
Ask $50.02 − bid $50.00
$50.03
Average fill, 500-share market buy
Walked three price levels
T+1
US stock settlement
Since May 28, 2024

Order types and time in force

  • Market: fill now at the best available prices. Use it only when getting out matters more than the price, and avoid it in thin stocks and in the first minutes after the open.
  • Limit: a maximum buy price or minimum sell price. It may fill partially or not at all.
  • Stop (stop-market): becomes a market order when the stop price trades. Good for exits; it can fill well past the stop in a gap.
  • Stop-limit: becomes a limit order at the trigger. Protects the price, but can leave you in a falling stock.
  • Trailing stop: a stop that follows the price by a set amount or percentage.

Time in force says how long the order lives: day (cancels at the close), good-till-canceled (stays open, subject to your broker's limits), immediate-or-cancel (fill what you can now, cancel the rest) and fill-or-kill (all now or nothing).

The trading day

The US regular session runs 9:30 a.m. to 4:00 p.m. Eastern Time. Exchanges run opening and closing auctions that gather orders and set one price for many shares at once; the official closing price comes from the closing auction. Many brokers also offer pre-market and after-hours sessions. Fewer participants trade then, so spreads are wider and prices jump more easily, and many brokers accept only limit orders outside regular hours.

Halts and circuit breakers

Trading can stop. An exchange can halt a single stock while news is released. The Limit Up–Limit Down mechanism pauses a stock briefly when its price moves too far, too fast. And market-wide circuit breakers halt all US stocks if the S&P 500 falls 7% (Level 1) or 13% (Level 2) from the previous close, for 15 minutes if it happens before 3:25 p.m. ET, or 20% (Level 3), which ends trading for the day. A halt means your stop order cannot fill until trading resumes, often at a very different price.

Settlement

A trade is agreed instantly but settles later, when cash and shares officially move. US stocks moved from T+2 to T+1 on May 28, 2024. The settlement cycle has shortened several times over the decades.

US stock settlement cycle, business days after the trade
Before 19951995201712024

T+5 moved to T+3 in 1995, T+2 in September 2017 and T+1 on May 28, 2024. Source: SEC settlement cycle rule changes.

Settlement matters in a cash account: you may only trade freely with settled funds, and selling shares bought with unsettled money can trigger restrictions. With T+1, a sale on Monday settles on Tuesday, holidays aside.

Common mistakes

  • Market orders in thin stocks, paying several levels of the book.
  • Trusting the last price instead of the live bid and ask.
  • Stop-limit orders on exits that never fill in a fast drop.
  • Extended-hours trading without limits.
  • Ignoring settlement in a cash account and getting restricted.
Check yourself

1. The bid is $20.10 and the ask is $20.14. What is the spread?

2. Asks: 100 shares at $10.00 and 100 at $10.10. You market-buy 200 shares. What is your average price?

3. You sell US shares on a normal Wednesday. When does the trade settle?

4. Which order type risks never filling during a fast price drop?