Stock market foundationsModule 4, lesson 17 of 29
Market orders and limit orders
The two basic order types in every trading app, how each is executed against the order book, partial fills, and how to choose between them.
In this lesson
- Explain what a market order and a limit order instruct the exchange to do.
- Work out the average price of a market order that fills at several prices.
- Predict whether a limit order will be executed now, later or not at all.
- Explain partial fills and order validity.
- Choose an order type for a given situation.
Builds on
- How stock exchanges workOrders are matched in the exchange's order book using the price-time priority explained there.
On this page
In simple terms
When you buy or sell shares, you send an order to the exchange through your broker. The two basic order types answer a simple question: what matters more to you right now, getting it done or getting your price?
- A market order says: buy (or sell) now, at the best prices currently available. It is executed immediately as long as there are orders on the other side, but you do not know exactly what price you will get.
- A limit order says: buy at this price or lower (or sell at this price or higher). You know the worst price you can get, but the order may not be executed at all.
How a market order is filled
A market order is matched against the best waiting orders on the other side of the order book. If the best order is too small to fill it, the rest of your order moves on to the next best price, and so on.
Worked example: A market order that walks the book
You want to buy 500 shares of a made-up company, Hooghly Jute Ltd. The screen shows the last price as ₹100. The sellers waiting in the order book are:
| Sellers' price (ask) | Quantity available |
|---|---|
| ₹100.50 | 200 |
| ₹100.80 | 150 |
| ₹101.20 | 300 |
Your market order for 500 shares fills like this.
| 200 shares at ₹100.50 | ₹20,100 |
|---|---|
| 150 shares at ₹100.80 | ₹15,120 |
| 150 shares at ₹101.20 | ₹15,180 |
| Total for 500 shares | ₹50,400 |
| Average price paid: ₹50,400 ÷ 500 | ₹100.80 |
You expected to pay about ₹100, the last traded price, but paid an average of ₹100.80. The difference between the price you expected and the price you got is called slippage. In shares that trade in small quantities, slippage on a market order can be much larger.
How a limit order is filled
A limit order sets a boundary.
- A buy limit at ₹100.60 means "buy at ₹100.60 or less". In the order book above, it would immediately buy the 200 shares offered at ₹100.50, and nothing more, because the next seller wants ₹100.80. If you asked for 500 shares, the remaining 300 would wait in the order book at ₹100.60 until a seller comes down to that price.
- A sell limit at ₹105 means "sell at ₹105 or more". If buyers are only bidding ₹100, the order waits.
When only part of an order is executed, it is called a partial fill. The rest stays in the order book until it is filled, cancelled by you, or expires.
How long does an order last?
Orders also have a validity. The most common is a day order, which is cancelled automatically at the end of the trading day if it has not been filled. Many apps also offer immediate or cancel (IOC) orders, which fill whatever they can at once and cancel the rest. Check what your broker's app uses by default.
Choosing between them
| Situation | Usually better | Why |
|---|---|---|
| Large, heavily traded company, small order | Either; limit is still safer | The spread is narrow and plenty of shares are available |
| Small or thinly traded company | Limit order | Market orders can fill far from the last price |
| Fast-moving market, for example just after news | Limit order | Prices can jump between the moment you look and the moment your order arrives |
| You must sell immediately whatever the price | Market order | Certainty of execution matters more than price |
| You only want to buy if the price falls to a level you have decided on | Limit order | The order waits for your price |
Why it matters
The order type decides what you actually pay or receive. Many beginners place market orders without looking at the order book and are surprised to buy at a noticeably higher price than the one they saw. Others place limit orders and wonder why nothing happened. Understanding both makes you a more deliberate buyer and seller.
It also protects you in thinly traded shares, which are often the ones promoted in tip groups. A market order in such a share can execute at a shockingly bad price, and that is exactly the situation some manipulators rely on.
Limitations
This lesson covers the two basic order types. Brokers also offer others, such as stop-loss orders, which become active only when the price reaches a trigger level, and orders placed after hours that are sent to the exchange when it opens. Their exact behaviour varies between brokers and segments, so read your broker's description before using them.
Even a limit order does not protect you from a bad decision. It controls the price of execution, not whether buying at that price is wise.
Common mistakes
- Assuming the last traded price is what a market order will pay. Your order trades against the orders waiting now.
- Using market orders in thinly traded shares. The average price can be far worse than expected.
- Setting a limit order and forgetting it. A forgotten order can be filled later, when you no longer want the shares.
- Chasing the price. Repeatedly cancelling and raising a buy limit order in a rising share often ends with a worse price than a calm decision would have produced.
Try it yourself
Use the order book in the example above (asks of 200 at ₹100.50, 150 at ₹100.80 and 300 at ₹101.20).
- What happens to a limit order to buy 300 shares at ₹100.80?
- What is the average price of a market order to buy 650 shares?
Answers: 1. It buys 200 shares at ₹100.50 and 100 at ₹100.80, so it is fully filled at an average of ₹100.60. 2. It takes every share on offer: ₹20,100 + ₹15,120 + ₹30,360 = ₹65,580 for 650 shares, an average of about ₹100.89.
Key takeaways
- A market order buys or sells immediately at the best prices available. You control speed, not price.
- A limit order sets the worst price you will accept. You control price, but the order may fill partly, later, or never.
- A large market order can fill at several prices, so its average price can be worse than the price on screen. This is slippage.
- Limit orders are usually the safer default, especially for shares that trade thinly or move fast.
Check your understanding
Finished reading?
Your progress is saved only in this browser.
Terms used in this lesson
- Market order
- An order to buy or sell immediately at the best prices currently available, which guarantees speed but not price.
- Limit order
- An order to buy at or below a set price, or sell at or above it, which controls the price but may not be filled.
- Order book
- The live list of all waiting buy and sell orders for a share, with their prices and quantities.
- Slippage
- The difference between the price you expected when placing an order and the average price you actually got.
Spotted a mistake or something unclear? Report it by email. Here is how corrections work.
This lesson is general education, not investment advice. Examples use made-up or clearly dated figures to explain ideas; they are not recommendations. Read the disclaimer.