How are BUY orders matched to to seller/s
If I put a BUY order in for 500 shares will it execute only if it matches one sell for 500 shares or will it accumulate smaller sell orders up to 500 then execute?
2 Comments
Sorted by latest first Latest Oldest Best
If you have set it as an all-or-nothing order, it will only fill if it can find a match (i.e. a seller) willing to sell at that price (or lower) for the total number of shares you are asking for.
Otherwise, then it will piece-meal the order together.
Example:
You place an BUY order for 500 shares at .00
The SELL book looks like so:
100 shares at .84
200 shares at .85
300 shares at .90
Your order will be filled for 100 shares @ .84, 200 at .85, and 200 at .90.
Generally speaking. (There are some pretty exotic order flags but generally this is how it works)
There are two parts of an order as far as a matching engine is concerned, there is a market maker and a market taker; this is different than buyer and seller. Lets run through a couple examples.
Beginning:
a buyer places an order with their highest bid, 100 shares for .34.
a seller places an order with their lowest ask, 100 shares for .40.
These two orders don't fill because they are [CO].06 apart. They sit on the order book as the current market makers. One is making a market for sellers, the other is making a market for buyers.
Order 1:
Should a buy order come in for 50 shares at .40, surpassing the existing high bid, and priced to the existing low ask, it will "take" from the market maker (assuming that 100 shares at 12.40 isn't flagged with all or none, or fill or kill or some other more exotic order flag.)
After this order the published bid/ask will be
100 shares at .34
50 shares at .40
Order 2:
If a new order comes in to sell 20 at .35 it would not get filled; it's still above the current high bid. But it's below the current low ask so the order book will adjust to:
100 shares at .34
20 shares at .35 (with the 50 shares at .40 still on the book, but not the current low anymore)
Order 3:
If a "market" order came in to buy 50 shares at market, then it will fill the 20 shares at .35 and 30 shares at .40. Market orders are dangerous because, generally, in retail markets you don't know where the next shares are priced. After the first 20 published the next ask might be at , and your order will fill 30 shares at or potentially even higher.
The order book now looks like:
100 shares at .34
20 shares at .40
Alternate Order 3:
Let's say alternatively that a limit order came in to buy 50 shares at .35. This order would take the 20 shares at .35 then become the new market maker/high bid for the remaining unfilled shares. The order book now looks like:
30 shares at .35
50 shares at .40
This is general market orderbook mechanics. Just know, there is a market maker, and a market taker for both buy and sell sides of the transaction. Most retail securities brokers don't price trade commissions differently for market makers and market takers. I've seen maker/taker pricing in crypto markets, generally a market maker will pay a lower commission.
Terms of Use Privacy policy Contact About Cancellation policy © freshhoot.com2025 All Rights reserved.