Moneydesks

🔄 How the stock market works: from your tap to settled shares

Open this guide in the app →

🎯 In 30 seconds: You never trade on an exchange yourself. You send an order to a broker, the broker routes it to an exchange, a market maker or another trading venue, and it is matched against someone else's order. The best displayed prices across all exchanges form the NBBO. After the match, a central clearinghouse guarantees the trade, and the shares and cash change hands one business day later (T+1).

The cast of characters

  • You, the investor. You decide what to buy or sell and at what price.
  • Your broker. A firm registered with the SEC and FINRA that holds your account, takes your orders and sends them somewhere to be filled. Individuals cannot connect to an exchange directly.
  • Exchanges. Regulated marketplaces where buy and sell orders meet. The New York Stock Exchange and Nasdaq are the famous ones, but there are many more.
  • Market makers. Firms that stand ready to buy or sell a stock at quoted prices all day. They earn the small gap between their buying price and selling price.
  • Other traders. Millions of individuals, pension funds, mutual funds, hedge funds and high-speed trading firms. Every share you buy, someone else sold.
  • The clearinghouse. A central firm that steps between buyer and seller after the trade and makes sure both sides deliver.

Exchanges: more than two

As of October 2026, the SEC lists 29 registered national securities exchanges. Some trade only options, but more than a dozen trade stocks. Most belong to a few groups: NYSE (owned by Intercontinental Exchange), Nasdaq, and Cboe, plus independents such as IEX and MEMX.

Being listed on an exchange and being traded there are different things. A company lists on one exchange, which sets its listing standards and runs its opening and closing auctions. But a stock listed on NYSE can trade on Nasdaq, Cboe and every other stock exchange at the same moment. That is why there is no single "price" in a strict sense, only the best prices across all of them.

The order book: how a match happens

Each exchange keeps an order book for every stock: a list of buy orders and sell orders waiting at specific prices. Those waiting orders are limit orders: "buy 100 shares, but pay no more than $50.00."

  • The bid is the highest price someone is currently willing to pay.
  • The ask (or offer) is the lowest price someone is currently willing to sell at.
  • The spread is the gap between them.

Orders are filled by price-time priority: the best price goes first, and at the same price, the order that arrived first goes first. A trade happens when an incoming order is willing to meet a waiting one.

Order book for a hypothetical $50 stockPriceShares waiting$50.04$50.03$50.02$50.00$49.99$49.98800600200300500900Sellers (asks)Buyers (bids)best askbest bidspread $0.02
Hypothetical book. Red rows are sell orders waiting, green rows are buy orders waiting. The best bid is $50.00, the best ask $50.02, so the spread is 2 cents.

Worked example. Using the book above, you send a market order to buy 300 shares. A market order means "fill me now at the best prices available."

200 shares at the best ask, $50.02$10,004
Next 100 shares at $50.03$5,003
Total for 300 shares$15,007
Average price paid$50.0233

Your order "walked the book": it used up everything at $50.02 and took some from the next level. If you had sent a limit order to buy at $50.00 instead, it would have joined the green row and waited, and you would only be filled if a seller came down to you.

The NBBO: the best price across all exchanges

Because the same stock trades on many exchanges, regulators need a reference price. The National Best Bid and Offer (NBBO) is the highest bid and the lowest ask displayed across all exchanges at that moment.

Exchanges send their best quotes and every trade to central data processors called SIPs (securities information processors). The SIPs combine them into the consolidated quote and trade feed most brokers show you. Your broker has a legal duty of best execution, which means it must seek the most favorable terms reasonably available for your order, using the NBBO as a key benchmark.

Since 2005, Rule 611 of Regulation NMS (the "order protection" or "trade-through" rule) has generally stopped trading venues from filling orders at prices worse than a protected quote shown on another exchange. In June 2026 the SEC proposed rescinding Rule 611. As of October 2026 that is a proposal, not a final rule, so check its status if you read this later.

Where your order actually goes

When you tap "buy", your broker usually has several choices:

  • An exchange. Your order enters that exchange's order book.
  • A wholesale market maker. A large firm that fills the order itself, buying from or selling to you out of its own inventory, usually at or slightly better than the NBBO. In December 2022, the SEC said retail brokers route more than 90% of individual investors' marketable orders to a small group of these off-exchange dealers.
  • An alternative trading system (ATS). A private matching venue registered as a broker-dealer. Many are called dark pools because they do not show their waiting orders to the public. Large institutions use them to buy or sell big blocks without tipping off the market.

Some market makers pay brokers for sending them orders. This is payment for order flow, and it is how many brokers offer zero-commission trading. It is legal and disclosed, but it creates a conflict of interest, which is why the best execution duty matters. Brokers publish quarterly order-routing reports (under SEC Rule 606) showing where they send orders and what they are paid. What trading really costs goes deeper.

Trades done off-exchange still have to be reported publicly, through FINRA trade reporting facilities, within seconds. So you see them on the tape, you just never saw the order beforehand.

Market orders in thin or fast stocks
A market order guarantees a fill, not a price. In a stock with few shares waiting, or in the first minutes after the open or after big news, a market order can walk several price levels and fill far from the last price you saw. In those conditions, use a limit order. Order types in depth and Bid, ask, spread and liquidity show how.

Auctions: the open and the close

Each listing exchange runs an opening auction and a closing auction. Orders collect before the bell, and the exchange calculates the single price at which the most shares can trade. Everything in the auction trades at that one price.

The closing auction sets the official closing price, which index funds, mutual funds and many charts use. Many funds trade at the close for that reason, which makes the closing auction one of the busiest moments of the day.

After the match: clearing and settlement

A trade is a promise: the buyer will pay and the seller will deliver. Two more steps turn that promise into ownership.

Clearing. Trades in US stocks go to the National Securities Clearing Corporation (NSCC), part of the Depository Trust & Clearing Corporation (DTCC). The NSCC acts as a central counterparty: it becomes the buyer to every seller and the seller to every buyer, so if one broker fails, the other side is still covered. It also nets trades. If Broker A's customers bought 50,000 shares of a stock and sold 48,000 during the day, Broker A only needs to receive 2,000 net shares, not settle 98,000 separately.

Settlement. The final exchange of cash and shares. Since May 28, 2024, the standard cycle for most US stock trades is T+1: one business day after the trade date. Buy on Monday, and the trade settles Tuesday. The shares are held electronically at DTC (the Depository Trust Company), recorded in your broker's name on your behalf. This is called holding in "street name", and your broker's records show which shares are yours.

Life of a tradeYouBrokerVenuematchesNSCCclearsSettledat DTCorderroutesmillisecondsguaranteesT+1Trade date (T)Next business day
The match itself takes a fraction of a second. Clearing and settlement finish the job by the next business day.

Your broker's app may show the shares in your account the moment the trade fills. In a cash account, though, the money from a sale is not fully "settled" until T+1, and that affects when you can reuse it. The rules every trader runs into explains good faith violations and other settlement traps.

Read your broker's routing report once
Search your broker's website for its "Rule 606 report". It shows, by quarter, which venues received customer orders and how much payment for order flow the broker received per 100 shares. Ten minutes with it tells you more about how your orders are handled than any marketing page.

Why this matters for a trader

  • The price on your screen is a quote, not a promise. Size and order type decide what you actually pay.
  • Spreads and liquidity are a real cost on every round trip, even with zero commission.
  • Most volume happens near the open and the close. The middle of the day is often quieter.
  • Settlement timing matters in cash accounts and when you sell to raise money for a bill.

Who supervises all of this, and what protects you if a broker fails, is the subject of Who runs and polices the market. When it all happens is covered in Market hours and settlement.

Try it

Open the paper trading portfolio and pick a heavily traded stock or an S&P 500 fund. Write down the bid, ask and spread. Place a paper limit order to buy 10 shares one cent below the bid and note how long it takes to fill, if it fills at all. Then do the same with a thinly traded small stock and compare the spreads. You have just seen liquidity with your own eyes.

Check yourself
  1. What is the NBBO? Answer: The National Best Bid and Offer: the highest bid and the lowest ask displayed across all exchanges at that moment.
  2. In what order are waiting orders in the book filled? Answer: By price-time priority: the best price goes first, and at the same price, the order that arrived first goes first.
  3. The book shows 200 shares offered at $50.02 and more at $50.03. You send a market order to buy 300 shares. What do you pay? Answer: $15,007 in total: 200 shares at $50.02 ($10,004) plus 100 at $50.03 ($5,003), an average of about $50.0233.
  4. You buy a stock on Monday. When does the trade settle? Answer: Tuesday. Most US stock trades settle T+1, one business day after the trade date.

Sources