What is Immediate or Cancel (IOC)?
Reviewed by Karthikeyan Anbarasan (Founder, TradeLyser) · Updated 19 Oct 2026 · Editorial policy
How an IOC order works
- You send a buy or sell with IOC validity, usually with a limit price; IOC can also be combined with a market order.
- The exchange matches it at once against orders already in the book, at your limit or better.
- Whatever quantity matches is filled; the rest is cancelled straight away and never rests in the book.
- Your order status shows the filled quantity and the cancelled quantity.
Worked example: what a partial fill does to risk
Using Figure 1: the IOC buy of 500 at ₹1,500 fills 350 at an average of ₹1,499.71 and cancels 150. Say your plan had a stop at ₹1,480, sized for 500 shares at ₹1,500: (1,500 − 1,480) × 500 = ₹10,000 of risk. With 350 filled, the real risk is the ₹5,24,900 paid minus 350 × ₹1,480 (₹5,18,000) = ₹6,900. The target leg must also be for 350 shares, not 500. A DAY limit would have filled the same 350 and left 150 waiting, which might fill later at ₹1,500 or not at all.
When traders use IOC
IOC limit
DAY limit
- Scalpers and momentum traders use IOC limits so a missed entry does not turn into a late fill after the move has gone.
- Exiting a thin option strike with an IOC limit caps how far below the screen price you sell, without leaving a stale order.
- Algorithmic and API traders use IOC so every order is resolved at once, which keeps the position state simple.
Limits and journal notes
- IOC does not improve the price available; it only stops the order waiting. In a thin book it may fill little or nothing.
- A partial fill changes your position size. Log requested and filled quantity for every IOC so risk in R is calculated on the real size.
- Count IOC orders that filled zero or partly per week. A high share means the limit is too tight for the instrument or the size is too large.
Reference guide
| Context | Value | Reading |
|---|---|---|
| IOC limit on a fast entry or exit | Price capped, no stale order | You never pay beyond the limit and nothing is left waiting |
| Partial fill not noticed | Size mismatch | Check filled quantity and resize the stop and target before moving on |
| IOC in a thin option strike | Often unfilled | The order can cancel with zero filled; widen the limit within plan or wait |
Questions
What is an IOC order?
An order that fills as much as it can immediately and cancels any quantity that does not fill. Nothing is left waiting in the order book.
What is the difference between IOC and DAY orders?
A DAY order rests in the book until the session ends if it does not fill at once. An IOC order cancels any unfilled quantity immediately.
What is the difference between IOC and FOK?
IOC allows partial fills and cancels the rest. FOK fills only if the whole quantity is available at once; otherwise nothing fills. NSE offers IOC but not FOK as a standard validity.
Can an IOC order be a market order?
Yes. An IOC market order takes whatever is available at the best prices right now and cancels the rest. An IOC limit adds a price cap.
Do I pay brokerage on a cancelled IOC order?
Most brokers charge only on executed quantity, so a fully cancelled IOC usually costs nothing. Check your broker’s pricing to be sure.