Skip to content
Wildflower
Join free
How markets work

Free Trading School · Level 1 · Course 1.2

How orders are matched

Lesson 8 of 14 in How markets workModule 2: How prices are made

Foundations · How markets work

How orders are matched

Wildflower Trading School · Lesson 1.2.2.3

Wildflower

Last time, you saw the order book: everyone waiting to buy and sell, at each price. Now let's see what happens when someone stops waiting and wants to trade right now. By the end of this lesson, you'll know the difference between a market order and a limit order, and how the exchange matches them. You'll also know who gets filled first when lots of people want the same price, and how a big order can move the price.

1 of 7

What you'll learn

  • Use a market order to trade now. It is sure to fill. The price is not sure.
  • Use a limit order to set your price. The price is sure. The fill is not.
  • Watch a trade print. A buy and a sell meet at one price. That becomes the last price.
  • Spot slippage. A big market order can use up the best price and fill at worse prices.
  • Know the queue. Best price fills first, then the earliest order at each price.

Exercise

  1. On a , place a limit order to buy one contract a little below the current price.
  2. Watch whether it fills, then cancel it if it hasn't.

Quick check

  1. 1. Which order is certain to fill, but not certain of its price?

  2. 2. Sellers wait at 5,000.25 (10 contracts) and 5,000.50 (40). A market order buys 15. Where is the new ask?

  3. 3. Two buy limit orders wait at the same price. Which fills first?

0 of 3 answered.

Finished this lesson?

Tick it off and keep your place

Make a free account and we'll remember where you are, so “Liquidity” is waiting next time.

Read the full notes

When a buy and a sell meet at one price, the matches them and a trade happens. take the best price waiting now; wait in the , best price first, then earliest first.

  • Market order: trade now at the best price available. Certain to ; price not certain.
  • Limit order: trade only at this price or better. Price certain; fill not certain. Limit orders wait in the order book.
  • When a buy and a sell meet at one price, a trade happens and the exchange prints it. That becomes the on your chart.
  • Example (made-up numbers): a market order to buy 20 takes 12 at 5,000.25 and 8 at 5,000.50, so the moves up and the is about 5,000.35. The difference is .
  • Most , including the , fill best price first, then earliest order first at each price ().

Worked examples

Made-up numbers

A market order meets the book

The ask: 5,000.25, with 12 contracts waiting to sell

  1. Market order: buy 1
  2. Matched at the ask: 12 → 11

Printed: 1 at 5,000.25

A bigger order moves the price

  1. Market order: buy 20
  2. 12 filled at 5,000.25
  3. 8 filled at 5,000.50

The ask moves up to 5,000.50

Who gets filled first?

Waiting to sell at 5,000.25, in order of arrival: Ana 5, Ben 4, Cara 3

  1. Market order: buy 6

Ana's 5 first, then 1 of Ben's

Your limit order joins the queue

  1. Your buy limit at 5,000.00 joins the back of the
  2. It fills only when sellers reach you
  3. If the price rises away, it might never fill

Market: sure to fill. Limit: sure of the price.

Trading is risky. You can lose money. This lesson explains how trading works. It isn't advice.