Granthara01.04.01Price-time priority: how orders are matched0%

01.04.01 · Price-time priority: how orders are matched

In 01.01.01 you bought ten shares of Bharat Foods at ₹500. It took a second, and then they were yours. It feels as though somebody read your order and agreed to sell to you.

Your order joined a queue

Nobody agreed to anything. A program sorted you, and you waited your turn.

Part 01 · How the Exchange Actually Works
  1. 01.04.01 Price-time priority: how orders are matched
  2. 01.04.02 Pre-open, continuous session, closing auction
  3. 01.04.03 Circuit limits, price bands, trading halts
  4. 01.04.04 Settlement cycles, delivery vs intraday
  5. 01.04.05 Demat, clearing corporation, counterparty risk
  6. 01.04.06 Corporate surveillance: ASM, GSM, ban periods
0 of 1 read
Learn

No person saw your order

Your broker did not find a seller for you. It passed your order to the exchange, and the exchange dropped it into a program that does exactly one job: hold every unfilled order in Bharat Foods, keep them sorted, and pair off whatever it can.

That program is the , and the sorted list it keeps is the . Your ten shares at ₹500 were not sent to anyone. They were given a position in a list, and they waited there until a seller came far enough down it to reach you.

Matching engineThe exchange's program that holds the order book and pairs buyers with sellers. It sees prices and arrival times, never identities.
Order bookEvery unfilled buy and sell order in a stock, held by the exchange and sorted by price, then by the time each one arrived.

The engine sorts on two things, and only two, in this order.

Price first. Among buyers, whoever will pay the most is served first — you are competing with the other buyers, not with the seller. A buyer at ₹501 is ahead of every buyer at ₹500, no matter when either of them arrived.

Then time. When two buyers name the same price, the engine cannot separate them on price, so it separates them on arrival. Whoever reached the exchange earlier is filled first, in full, before the later order receives a single share.

See it

Four buy orders, and a seller

This is the queue your ₹500 sat in. The rows are in the exact order the engine reads them. Drag the seller's quantity and watch where the shares go.

Look at the bottom row. It arrived before all three others and is still last, because ₹499 is a worse price. Then look at yours: same price as the row above it, six seconds later, and completely behind it.

The exchange does not know who you are. It knows what you offered and when you arrived.

Learn

Why these two rules and no others

Price first is not fairness — it is how a price gets discovered at all. If the seller had to be reached in some other order, the market would trade at worse prices than someone was openly willing to pay.

Time second is fairness, and it is the rule doing quiet work. It is the reason a large order cannot push in front of a small one, the reason no participant can pay for a better position, and the reason 01.03.03's market makers have to keep re-entering their quotes rather than owning a place at the front.

Between them the two rules mean the engine never makes a judgement. It has no opinion about the fund, the HNI or you. It reads a number and a timestamp, and everything else about you is invisible to it.

The mistake this creates

Seeing trades happen at your price does not mean you traded. A at ₹500 is a request to be *considered* at ₹500 — it becomes shares only when the queue in front of it is exhausted. You were filled that day in 01.01.01, and whether you were depended entirely on how much the sellers brought.

Limit orderAn order that names the worst price you will accept. It waits in the order book until someone meets that price, and may never be filled.
Try it

Your buy order for 10 shares at ₹500 is resting in the book. You watch 400 shares trade at ₹500, and your order is still unfilled. What is the most likely explanation?

Two rules, applied to every order in the country, for the whole of the trading day. Almost. They do not govern the two moments when the most shares change hands at once — the open and the close, which match everybody together at a single price instead.

Before you read this, which was true?

Remember

An exchange matches on two rules and nothing else: the best price goes first, and among equal prices, whoever arrived first goes first. Placing an order does not buy shares — it buys a place in a queue.

Next
01.04.02 — Pre-open, continuous session, closing auction

That queue runs all day. The opening and closing prices are set by a different mechanism entirely.