Suppose that Bob wants to buy share X for $100. Sue wants to sell that share for $120. Sarah wants to sell her share for $130. All of them use the same market-maker (e.g., some brokerage website). How does the market-maker pair up the buyer and the seller?

It could pair Bob and Sue, which would yield a lower spread (benefiting the buyer), or it could pair Bob and Sarah which would yield a higher spread (benefiting the market-maker).

Edit: clarified the spread

  • 2
    You might want to double-check your example, because at this constellation it would be impossible to pair anyone with anyone. Trading can only happen when there is at least one buyer willing to pay more or equal to what at least one seller demands. Perhaps you mixed up buyers and sellers in your example? Then it would make sense.
    – Philipp
    Commented Dec 15, 2020 at 1:26

2 Answers 2


A brokerage web site isn't a market maker. Brokers are intermediaries that buy and sell securities for an investor/trader. Market makers tend to be large banks or financial institutions that provide market liquidity.

You lack a fundamental understanding how trading occurs on stock exchanges. Per your example, if Bob wants to buy at $100 and Sarah wants to sell at $130 (limit orders), no possible trade can occur because their orders are $30 apart ($20 for Bob and Sue).

In the real world where there is an NBBO quote, in order for Bob's buy limit order to fill at $100, the ask price must drop to $100. In order for Sue's limit order to sell at $120, the ask price must rise to $120 and to $130 for Sarah to get a fill. With a market price anywhere between $90 and $120, all three of these orders go on the order book, waiting for someone willing to trade at their order prices.

In a mythical world where these are the only market participants, the current quote would be $100 x $120 where Bob is the $100 bid, Sue is the $120 offer and Sarah's $130 order is on the order book.

  • Why can't any trading happen? With NBBO in place, the exchange would guarantee that the buyer would get the best ask price and the seller would get the best bid price, with the spread (the difference between the bids vs ask price) going to the exchange. So Bob and Sue would be paired up.
    – nz_21
    Commented Dec 14, 2020 at 22:55
  • 3
    @nz_21 no, you have it backwards. If Bob buys for $100 and Sue sells for $120, where would the extra $20 come from that Sue gets?
    – D Stanley
    Commented Dec 14, 2020 at 23:11
  • @DStanley my understanding is that Sue doesn't get the $20 -- the exchange has to find the best matching pair. For example, on coinbase I don't necessarily get to trade at the price I want - I always end up executing at a slightly different price. So basically, the exchnge makes Bob buys for $120 and makes Sue get $100.
    – nz_21
    Commented Dec 14, 2020 at 23:39
  • 3
    No, that's not how it works, unless Bob places a "market" order, in which case no price is given. If Bob only wants to buy at $100 (or better), then no trade occurs. If Bob places a Market order and buys at $120, then Sue gets $120.
    – D Stanley
    Commented Dec 14, 2020 at 23:43
  • If you're not getting the price that you expect it's because you're placing a "market" order and buying at the best "ask" price, which may change between the time you see a quote and when the order is filled. Same for selling at market; you're paired up with the best "bid" price. If you want to trade at a certain price then use a "limit" order and hope that someone else is willing to trade at that price.
    – D Stanley
    Commented Dec 14, 2020 at 23:45


Generally, a buy order and a sell order are compatible if the maximum price of the buy order matches or exceeds the minimum price of the sell order.

In your example, the maximum buy price is $100, and the minimum sell price is $120, and $100 is less than $120, so there is no matching. If Bob submits a buy order for $100, then a price less than that would be compatible, but a higher price is not (if you tell someone that you want them to buy something for $100 on your behalf, and they come back and say "I bought it for $90 instead", you'll be happy, but if they come back and say that they agreed to a price of $110, when you only authorized $100, you won't be). Similarly, Sue won't be happy unless the shares sell for at least $120. It's not possible for a price to be less than or equal to $100, and greater than or equal to $120.

So to make your question work, we would have to modify it, such as swapping buy and sell. A further modification is that we need to be more specific than merely saying that people "want" to buy/sell at a particular price. People can "want" all they want, but if that's all they do, then nothing happens. For a trade to take place, there must be a quote and an order. A quote is when someone announces that they are committing to buying (bid) or selling (ask) at a particular price. An order is when someone says that they will accept a quote at least/ at most a particular amount. If Bill submits an ask of $100, and Sue and Sarah submit orders, then whichever order is submitted first will be filled (and the price would be $100 either way). If Sue and Sarah both submit bids, and Bob submits an order, then the order will be filled with the bid farthest from his price, in this case Sarah (and so the transaction would be at $130).

If Sue and Sarah had submitted bids with the same price, there are two main ways a market would decide between them. There's FIFO, where the earliest bid is prioritized. The other method is pro-rata, in which Bob's order is partially filled by Sue's bid, and partially filled with Sarah's.

Under a basic FIFO algorithm, or price-time-priority algorithm, the earliest active buy order at the highest price takes priority over any subsequent order at that price, which in turn takes priority over any active buy order at a lower price.

Under a basic pro-rata algorithm, the system prioritizes active orders at a particular price proportional to the relative size of each order.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .