How traders orders get matched (exchange matching algorithms)?

Imagine you and your friends are playing a game where everyone wants to buy or sell candy, some want to buy it, others want to sell it. The exchange is like the teacher who helps match buyers with sellers.

How It Works

When someone says they want to buy candy, that’s a buy order. When someone says they want to sell candy, that’s a sell order.

The exchange looks at all these orders and tries to match them up, like pairing friends who want to trade snacks during lunch. If a buy order and a sell order have the same price, they get matched right away, it's like finding someone who wants exactly what you're offering!

If no one has the exact same price, the exchange will still try its best. It might match the closest prices first, just like how your teacher might pair you with the friend who’s most willing to trade.

The matching algorithm is like a super-efficient helper that works really fast and makes sure everyone gets what they want, or as close as possible!

Take the quiz →

Examples

  1. A trader wants to buy 100 shares of a stock at $25. Another trader is selling the same stock at $25, so their orders match instantly.
  2. Imagine a marketplace where people shout prices for items, when someone says 'I'll take it at $25,' and another says 'I'm selling it at $25,' they trade right away.
  3. A stock exchange works like a vending machine: you pick what you want, and the system finds who has exactly that.

Ask a question

See also

Discussion

Recent activity