πŸ“˜ Stock Market Basics

How Does the Stock Market Work?

How buy and sell orders get matched, the role of exchanges and brokers, and why prices update in real time.

🎯 Beginner⏱️ ~7 min read

Written by the SmartRates Academy Team Β· Reviewed by M. Reyes, Financial Systems Architect & Data Analyst

🎯 Key Takeaways

  • Exchanges are electronic marketplaces that match buyers and sellers
  • Brokers route your orders to exchanges (or other venues) on your behalf
  • The 'price' you see is the last price at which a trade actually happened
  • Market makers and other liquidity providers help ensure there's usually someone on the other side of your trade

The market is a giant matching engine

At its core, a stock exchange is a marketplace where buy orders and sell orders for the same security are matched against each other. Exchanges like the NYSE and Nasdaq operate enormous electronic systems that process millions of these matches every day, almost instantly.

Every order has a price and quantity attached. The exchange maintains an 'order book' for each stock β€” a running list of buy orders (bids) ranked from highest to lowest price, and sell orders (asks) ranked from lowest to highest. A trade happens whenever a bid and an ask meet at the same price.

Your broker is the middleman

When you tap 'Buy' in a brokerage app, your order doesn't go straight to the NYSE. Your broker routes it β€” often through a market maker or directly to an exchange β€” where it's matched against existing orders. This typically happens in a fraction of a second.

Brokers are regulated intermediaries (in the US, registered with FINRA and the SEC) that hold your account, execute your orders, and report the resulting trades back to you. Most retail brokers now offer commission-free trading on US stocks and ETFs, making their money instead from things like interest on uninvested cash, payment for order flow, and services.

Bid, ask, and the spread

At any moment, a stock has a 'bid' price (the highest price someone is currently willing to pay) and an 'ask' price (the lowest price someone is currently willing to sell for). The difference between them is called the bid-ask spread.

Example: Reading a quote

Suppose a stock shows: Bid $50.10 Γ— 200 shares, Ask $50.12 Γ— 150 shares.

If you place a 'market order' to buy, you'll likely pay around $50.12 (the ask).

If you place a 'market order' to sell, you'll likely receive around $50.10 (the bid).

The 2-cent difference is the spread β€” a small built-in cost of trading that tends to be larger for less-traded ('illiquid') stocks.

Who's on the other side of your trade?

It might feel like you're trading against 'the market,' but every trade has a specific counterparty β€” another investor, a fund, or a market maker. Market makers are firms that continuously post both buy and sell quotes for a stock, profiting from the small spread while providing liquidity so that ordinary investors can buy or sell quickly without waiting for a matching order to show up naturally.

Settlement: when the trade actually 'completes'

When your order executes, you own the shares (or have sold them) immediately from an economic standpoint β€” the price is locked in. But the official transfer of ownership and cash, called settlement, currently takes one business day after the trade (referred to as T+1) for most US stock trades. This matters mostly for things like how quickly proceeds from a sale become available to withdraw or reinvest.

Following an order from click to fill

Say you tap 'Buy 5 shares' on a stock quoted at a $50.10 bid / $50.12 ask. Your broker's system checks your account has enough cash, then routes the order β€” often to a market maker or an exchange β€” within milliseconds.

The order is matched against a resting sell order (or a market maker's quote) at or near $50.12. You receive a fill confirmation almost instantly showing the exact price and number of shares executed, and your account balance and holdings update in real time β€” even though official settlement of the cash and shares completes one business day later.

Frequently Asked Questions

Is the stock market open 24/7?+

No. The main US trading session runs 9:30 a.m. to 4:00 p.m. Eastern Time on business days. Many brokers also offer limited pre-market and after-hours trading, but volume and liquidity are much lower during those windows.

Why do stock prices change even when I'm not trading?+

Because thousands of other investors are continuously placing orders based on new information, changing opinions, and shifting supply and demand β€” the price you see reflects the most recent trade among all of those participants.

Do I need to understand order books to invest?+

No. For long-term investors using simple market or limit orders, the underlying matching mechanics happen automatically. Understanding the basics just helps you interpret what you see and make more informed order choices.

⚠️ Mistakes to avoid

βœ• Believing the exchange or company sets the live price.

β†’ Price is the last matched trade between participants β€” it moves with supply and demand, not a central setter.

βœ• Assuming your order trades with the company itself.

β†’ After the IPO, you trade with other investors. The company usually isn't a party to your trade.

βœ• Ignoring liquidity when buying thinly traded stocks.

β†’ Low liquidity means wider spreads and worse fills. Check volume before trading small names.

✍️ Your turn

Watch a quote move

Pick a widely traded stock and observe its bid, ask, and last price during market hours.

  1. Find the current bid (highest buyer) and ask (lowest seller).
  2. Note the gap between them β€” the spread.
  3. Refresh a few times and watch the 'last price' change as trades occur.

Check your understanding

3 quick questions β€” pick an answer to see why it's right.

1. When you see a stock 'price,' what are you actually looking at?

2. What role does a broker play when you place an order?

3. Why is there usually someone on the other side of your trade almost instantly?

Market Academy progressβ€” / 92

Next recommended lesson

NYSE vs NASDAQ β†’

Stock Market Basics

← Previous

What Is a Stock?

Next β†’

NYSE vs NASDAQ