What you will learn
- Follow an order from your brokerage app to the exchange
- Read a basic order book and tell a bid from an offer
- Use price-time priority to work out which order fills first
- Describe what clearing and settlement do, and what T+1 means
When you tap buy in a brokerage app, the app sends your order to an exchange. The exchange uses a set of rules to match it with an order from someone who wants to sell. The process continues after the match, because the buyer still needs to receive the shares and the seller still needs to receive the money.
How does the stock market work?
Finance & Quant Society made this overview of how a stock market works.
The order book
A modern exchange keeps an order book: a live list of buy and sell orders waiting to be filled. The exchange sorts those orders by price and updates the list as traders add, fill, or cancel orders.
Key terms
- Order book
- The live list of all waiting buy and sell orders for a security, organized by price.
- Bid
- A buy order. It shows the price a buyer is willing to pay and how many shares they want.
- Offer (also called the ask)
- A sell order. It shows the price a seller wants and how many shares they are selling.
- Fill
- The completion of an order. A partial fill means only some of your shares traded.
The table shows a small order book for an imaginary stock. The highest price offered by a buyer sits below the lowest price a seller will accept. That gap is the spread, which you will study in another lesson.
| Side | Price | Shares waiting |
|---|---|---|
| Sellers (offers) | $50.12 | 200 |
| Sellers (offers) | $50.11 | 100 |
| Buyers (bids) | $50.09 | 150 |
| Buyers (bids) | $50.08 | 300 |
Price-time priority
Most exchanges use price-time priority to decide which order trades next. Price comes first: the highest bid and lowest offer move to the front of their lines. If several orders have the same price, the exchange fills the oldest one first. A better price earns priority, and speed matters when prices are tied. This is one reason firms spend heavily on faster trading systems.
- A trade takes place when a buyer will pay at least the price a seller asks. The orders cross and execute.
- If no one accepts your price, the order waits in the book until someone does or you cancel it.
- Orders can arrive, fill, and disappear thousands of times each second, so the book keeps changing.
Walking a market buy through the book
Using the order book above, you place a market order to buy 250 shares. A market order takes the best available sell prices, starting with the cheapest offer.
- Take the best offer. The lowest sell price is $50.11, with 100 shares available. Your order takes all 100.
- Move to the next offer. You still need 150 shares. The next offer has 200 shares at $50.12, so your order takes 150.
- Check the total. The 100 shares at $50.11 and 150 shares at $50.12 fill all 250 shares.
Why it matters: A large order may use all the shares at the best price and then move to a worse one. The difference between the expected price and the actual result is called slippage.
Which level fills the rest?
Same order book. The best offer is 100 shares at $50.11, and the next is 200 shares at $50.12. You send a market buy for 250 shares. How many of your shares are filled at the $50.12 level?
Whose order trades first?
Two sellers are waiting. Seller A offers 100 shares at $50.11 and placed the order at 9:45. Seller B also offers 100 shares at $50.11 but placed the order at 9:47. A buyer arrives willing to buy 100 shares at $50.11. Whose shares trade?
When price is tied, the earlier order wins. Seller A placed the order first, so Seller A trades.Clearing and settlement
A match on the exchange starts the trade, but two more steps finish it. Clearing calculates what each side owes. Settlement transfers the shares to the buyer and the money to the seller. A central clearinghouse stands between the two sides and guarantees completion even if one side fails to deliver. That guarantee reduces the risk of a failed trade.
A standard US stock trade settles one business day after it takes place. Traders call this T+1. If you buy shares on Monday, the shares and cash officially change hands on Tuesday. Your screen shows the trade at once, while settlement happens later.
How does the stock market work? (TED-Ed)
TED-Ed reviews the exchange as a whole. Use it if you want to see the order process a second time.
The exchange matches the orders. The clearinghouse makes sure the trade finishes.
Explain what happens to an order
In your own words, follow an order from the moment you tap buy until the shares belong to you. Use the words order book, cross, and settlement.
Write an answer before comparing it with the model response.
Model answer
When I tap buy, the app sends my order to an exchange, where it joins the order book. The order executes when it crosses a matching sell order. Clearing calculates what each side owes, and settlement transfers the shares and cash on a T+1 schedule.
You can now follow an order through matching, clearing, and settlement. The next lesson explains where new shares come from and how later trades between investors differ from the original sale.