Skip to content
Tutorials Center
My learning

Topics

Lesson 9 of 46 ยท Financial Markets and Instruments

Orders and how trades happen

Learn market, limit and stop orders, time-in-force, partial fills, and the journey of a trade from your click through the exchange to clearing and settlement.

When you press "buy", you are not sending money to the stock. You are placing an order, an instruction to your broker that says what to buy, how much and under what conditions. The conditions are where the skill lies. The same click can fill instantly at an unexpected price or sit unfilled for days, depending on the type of order you chose. This lesson explains the common order types, what can go wrong with each, and the surprisingly long journey a trade takes after it is matched.

Five numbered steps: you place an order, your broker sends it on, the exchange matches it, clearing confirms terms, settlement exchanges cash for shares a day or two later
Caption: the life of a trade; matching is fast, settlement takes a day or two.

What you will learn

  • The differences between market, limit and stop orders.
  • What time-in-force and partial fills mean.
  • How a trade moves from order to settlement.
  • The hidden costs of trading and how to limit them.

Key terms

Market order: an order to trade immediately at the best available price.

Limit order: an order to trade only at a specified price or better.

Stop order: an order that becomes a market order once the price reaches a trigger level.

Settlement: the final exchange of cash and securities after a trade.

Slippage: the difference between the price you expected and the price you got.

Market orders

A market order says "do it now, at whatever price is available". A buy market order takes the lowest asks in the book until it is full; a sell market order hits the highest bids. It nearly always fills, which is its strength. Its weakness is price uncertainty. In a liquid stock with a one-cent spread the uncertainty is tiny. In a thin stock, or during a sudden market shock, the next price can be far from the last one you saw. Use market orders for large, liquid securities where speed matters more than a few cents.

Limit orders

A limit order sets a price boundary. A buy limit at $49.95 means "buy at $49.95 or lower"; a sell limit at $51.00 means "sell at $51.00 or higher". If the market is already at or beyond your limit, the order fills right away at the market price (never worse than your limit). If not, it sits in the order book waiting. Look at the order book from Lesson 2: a buy limit at $50.02 joins the bids; a buy limit at $50.04 or above would meet the best ask and trade.

The price of control is that you might never trade. If the market moves away, your order sits unfilled while the stock climbs without you. Limit orders are the standard choice when price matters more than speed, for illiquid stocks and for ETFs, where the quoted spread can be wide.

Stop orders

A stop order is dormant until the price touches a trigger, then it turns into a market order. A stop-loss sell at $95 on a share you own at $100 means "if the price falls to $95, sell". People use it to cap losses. Two cautions apply:

  1. Gaps. Prices do not move smoothly. If bad news arrives overnight and the share opens at $90, your stop triggers at the open and sells near $90, not $95. The stop does not guarantee a price.
  2. Whipsaws. A brief dip through your stop followed by recovery can sell you out right before a rebound.

A stop-limit order combines the two: when the trigger is hit it places a limit order instead of a market order. That caps the price but risks no fill at all in a fast fall. Neither type is better; each trades one risk for another.

Time in force and fills

Every order has a lifetime. A day order expires at the close of the trading session. A good-til-canceled (GTC) order stays active until filled or cancelled, often with a maximum of a few months at many brokers. Specialized instructions exist, such as fill-or-kill (all now or cancel), but beginners rarely need them.

Orders can fill in pieces. If you want 1,000 shares and only 600 are available at your price, you get a partial fill and the rest waits. Your confirmation shows each fill and the average price. Many brokers also offer fractional shares, letting you invest a fixed dollar amount, say $100, in a share worth $350.

The life of a trade

The picture shows five steps.

  1. You place an order through an app or website.
  2. Your broker routes it to an exchange or other trading venue. Brokers must seek good execution for customers and many send small orders to wholesale market makers.
  3. The exchange matches it against an opposite order in the book. This takes milliseconds. You see "filled".
  4. Clearing confirms the terms and reduces risk. A central counterparty steps between buyer and seller, guaranteeing that each gets what they bargained for even if the other fails.
  5. Settlement is the legal transfer: shares move to your account and cash to the seller's. Settlement used to take days; the United States moved to one business day after the trade ("T+1") in 2024, and several other markets use T+1 or T+2, with changes in progress. Check the rule for your market.

Until settlement is complete, you generally cannot withdraw the cash from a sale as if it were new money, though many brokers let you reuse it earlier within limits. Your shares are usually held in your broker's name on your behalf ("street name") at a central depository, but recorded as yours. A good broker keeps customer assets separate from its own, and many countries have investor-protection schemes for failure of a broker, which do not cover market losses.

The costs of trading

Trading has costs beyond commissions, which many brokers have reduced to zero.

  • The spread: you buy at the ask and sell at the bid. A round trip costs the spread.
  • Slippage on large or fast-moving orders.
  • Fees and taxes: transaction taxes in some countries, capital-gains taxes on profits, currency conversion charges for foreign shares.
  • Payment for order flow: some brokers earn money by routing orders to market makers who pay for them. Rules differ by country.

The costs seem small per trade, but frequent traders pay them again and again. The cheapest trade is often the one you do not make. A long-term investor who buys a diversified fund monthly and rarely sells keeps almost all of these costs low.

Short selling and leverage, briefly

Short selling means borrowing shares, selling them and hoping to buy them back cheaper. Profit is limited, because the price can fall only to zero, but losses are unlimited, because a price can rise without limit. Margin means borrowing from your broker to buy more than your cash allows. Both are leverage: they magnify gains and losses and can force you to sell at the worst moment. Treat them as advanced tools, and read your broker's risk disclosures carefully before touching them. Chapter 7 covers derivatives, another form of leverage.

Common misconceptions

"A stop-loss guarantees my exit price." It guarantees only that a market order is triggered. In a gap or a fast fall, the fill can be far below the stop.

"My limit order didn't fill, so the broker failed." A limit order fills only if the market reaches your price. That is how it is designed.

"Zero commission means free trading." The spread, slippage and taxes remain.

Try it

First, a limit-order simulator. It runs a buy limit against a few possible incoming prices and shows when it fills.

Python Limit order or market order?

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Second, what a stop-loss really does when the price gaps. The path of prices is invented.

JS Stop-loss and a gap

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Check your understanding

Quick check ยท 5 questions

of 5 answered You scored / 5 ยท perfect!

  1. 1. Which order type almost always fills, but at an uncertain price?

    A market order trades at the best available price now. The price may differ from the last quote.
  2. 2. You place a buy limit at 49.95 while the best ask is 50.04. What happens?

    A limit order never pays more than the limit. If the market is above it, the order waits and may not fill.
  3. 3. A stop-loss at 95 triggers when the stock opens at 90. Where does the sale roughly happen?

    A triggered stop becomes a market order, so it sells near the available price, which is 90 after the gap.
  4. 4. What is settlement?

    Matching takes milliseconds; settlement completes the legal transfer one or two days later in most markets.
  5. 5. Which is a hidden cost of trading even with zero commission?

    You buy at the ask and sell at the bid, so each round trip costs at least the spread.

Summary

  • Market orders fill now at an uncertain price; limit orders fix the price but may not fill; stop orders trigger market orders at a level.
  • Prices can gap, so stops do not guarantee exit prices.
  • A trade is matched quickly, but clearing and settlement finish it a day or two later.
  • Spread, slippage and taxes are real costs; trading less often keeps them small.

Next: Chapter 2 review