Nobody "sets" a stock's price. It's the byproduct of a standing queue of unexecuted orders, the limit order book, plus a stream of incoming orders that consume it.
Master that mechanically and market prices stop being mysterious.
What is the difference between a limit order and a market order?
There are two basic orders, and a compromise between them.
- A limit order states a price and waits: "buy 500 at ₹249.50 or lower." It supplies liquidity, sitting in the book until it's matched or killed, or until it expires. It may never fill.
- A market order states only a quantity: "buy 1,500 now, at whatever the book charges." It demands liquidity and fills instantly against the best waiting orders. You give up control of the price.
- A marketable limit order is the practitioner's compromise. "Buy 700, up to ₹249.90" takes liquidity like a market order but with a price ceiling. Stop-loss orders, which lie dormant until a price triggers them, exist in both markets too, though knowing they exist is enough for now.
Advertisement
How are orders ranked and matched in the book?
The book itself. All resting buy limits are ranked best-first, highest price at the top. All resting sell limits are ranked the same way, lowest price at the top. The top of each queue gives the best bid and best ask. Their gap is the bid-ask spread and their average is the mid price. The quantities stacked at each level are the depth. The last traded price (LTP), the number on every ticker, is history. It's the price at which the most recent match happened. The bid and ask are now, the prices at which you could actually deal this instant.
Matching rule: price-time priority. Orders match best price first. Among orders at the same price, it's first-come-first-served. Both NSE/BSE and the US exchanges run on this principle. Nobody jumps the queue, so a new order at the same price joins the back of that price's line.
The mini order book: work it with a pencil
Meridian Foods Ltd (synthetic company, NSE-style book, tick size ₹0.05). At 09:31 the book is:
| BIDS (buyers) | ASKS (sellers) | ||||
|---|---|---|---|---|---|
| Qty | Price (₹) | Time | Qty | Price (₹) | Time |
| 500 | 249.50 | 09:31:02 | 400 | 249.80 | 09:30:58 |
| 300 | 249.45 | 09:30:41 | 600 | 249.90 | 09:31:00 |
| 800 | 249.40 | 09:30:12 | 1,000 | 250.00 | 09:30:47 |
| 1,200 | 249.30 | 09:29:55 | 1,500 | 250.20 | 09:30:15 |
| 2,000 | 249.00 | 09:30:30 | 2,500 | 250.50 | 09:29:48 |
A best bid of ₹249.50 and a best ask of ₹249.80 give a spread of ₹0.30 and a mid of ₹249.65. As a fraction of mid, the spread is 0.30 / 249.65 = 0.12% ≈ 12 basis points, where one basis point is 0.01%.
Scenario A, worked with you. A market BUY for 1,500 shares arrives, and it eats the ask side top-down:
- 400 @ ₹249.80 = ₹99,920
- 600 @ ₹249.90 = ₹149,940
- 500 of the 1,000 @ ₹250.00 = ₹125,000
Total: 1,500 shares for ₹374,860 → average fill ₹249.91 (374,860 / 1,500 = 249.9067). Impact cost = (average fill − mid) / mid = (249.9067 − 249.65) / 249.65 = +0.103% ≈ 10 bps. That's the real, invisible cost of demanding 1,500 shares right now, over and above any brokerage. NSE publishes impact cost per stock computed this same way. It's the exchange's official liquidity measure, and, as you'll see in how indices are built, an index-entry criterion. After the trade the best ask is ₹250.00 with 500 left, the best bid is unchanged at ₹249.50, and the LTP is ₹250.00, the last match. The aggressive buyer moved the price. Opinion had nothing to do with it. Consumption did.
Now it's your turn. Reset the book to the original table for each scenario, compute, then check against the answers below.
- Scenario B: A limit buy for 200 @ ₹249.60 arrives. (i) Does it execute? (ii) What are the new best bid, spread, and mid?
- Scenario C: A marketable limit buy for 700 @ ₹249.90 arrives. (i) How does it fill and at what average price? (ii) What remains at ₹249.90? (iii) New LTP?
- Scenario D: A market SELL for 1,000 arrives. (i) Fill schedule and average price? (ii) Impact cost vs the ₹249.65 mid? (iii) New best bid and LTP?
- Scenario E (priority): Two bids rest at ₹249.50, the 500-share order (09:31:02) and a new 400-share order placed at 09:31:20. A market sell for 600 arrives. Who fills what?
Answers. B: ₹249.60 < best ask ₹249.80, so nothing executes. The order joins the book as the new best bid. Now the book reads 249.60 bid / 249.80 ask, so the spread is ₹0.20 and the mid ₹249.70. Notice what just happened. One patient 200-share order improved the quoted market for everyone. C: Fills 400 @ 249.80 (₹99,920) + 300 @ 249.90 (₹74,970) = 700 shares for ₹174,890 → average ₹249.84. The cap ₹249.90 was never breached. Remaining at ₹249.90: 300 shares. LTP = ₹249.90. D: Eats the bid side: 500 @ 249.50 (₹124,750) + 300 @ 249.45 (₹74,835) + 200 of 800 @ 249.40 (₹49,880) = 1,000 shares for ₹249,465 → average ₹249.47 (249.465). Impact cost = (249.65 − 249.465) / 249.65 = 0.074% ≈ 7 bps. New best bid ₹249.40 (600 left), and LTP ₹249.40. E: Both orders sit at ₹249.50, so time priority decides. The 09:31:02 order fills its full 500 first, and the 09:31:20 order fills the remaining 100, leaving 300 resting. Price first, then time, always.
What the book teaches you as an analyst. (1) Liquidity is a real cost. In a thin small-cap your own buying can move the price several percent, so a "cheap" stock you can't enter or exit at the screen price isn't cheap. (2) Depth matters more than the spread alone, because a tight spread with 50 shares behind it is a mirage. (3) Every candlestick chart is just this book's history compressed. There's no wizard behind the curtain.
What rules sit around the order book?
Guardrails around the book. Individual stocks in India trade inside daily price bands of ±2/5/10/20%, depending on the stock, and stocks with derivatives have a flexing dynamic band. Market-wide circuit breakers halt everything. India's breakers trigger at Nifty/Sensex moves of 10%, 15% and 20%. The US halts for 15 minutes on S&P 500 declines of 7% and 13% and ends the day at 20%, and it adds per-stock limit-up/limit-down bands. As for sessions, India runs a pre-open call auction 09:00–09:08 and continuous trading 09:15–15:30, with the close set as the last-30-minute VWAP. The US runs 09:30–16:00 with big opening and closing auctions. It also has pre- and post-market sessions.
India also has exchange-run block deal windows, which is how institutions cross big trades: a minimum of ₹10 crore, at a price within ±1% of reference. It also mandates bulk deal disclosure for any single-day accumulation above 0.5% of shares. Both are published daily on the exchange sites. They're handy breadcrumbs, because they show you who is building or exiting a position.