Definition
An immediate-or-cancel (IOC) order is a time-in-force instruction that requires all or part of an order to execute immediately at the specified price or better, with any unexecuted portion cancelled rather than left on the order book.
How it works
When an IOC order reaches the market, the exchange or broker's routing system checks the order book for matching orders. It fills as much as it can instantly, then cancels the rest. Nothing is left waiting.
Three features define the behaviour:
- Immediacy. Execution is attempted once, at the moment the order arrives. There is no queue and no waiting for the price to come to you.
- Partial fills allowed. If only some of the quantity is available at your price, you receive that part and the remainder lapses.
- A price condition. IOC orders are normally paired with a limit order price, so you never pay more (or sell for less) than the limit. Some venues also allow IOC with a market-style instruction, in which case the order sweeps available liquidity at whatever prices are on offer.
An IOC order may match against several resting orders at different price levels, as long as each is within your limit. That can produce multiple small executions that are reported as one order.
Availability varies. Many exchanges and brokers support IOC, some offer it only for certain products or to certain account types, and the exact label and rules differ by venue. Check your broker's order types and the relevant exchange rules.
Worked example
Suppose you want to buy 10,000 shares of a hypothetical company. The ask side of the order book looks like this (all numbers are illustrative):
| Ask price | Shares available |
|---|---|
| $50.00 | 3,000 |
| $50.05 | 2,000 |
| $50.10 | 1,500 |
| $50.20 | 5,000 |
You submit an IOC buy order for 10,000 shares with a limit of $50.10.
- The order matches 3,000 shares at $50.00.
- It matches 2,000 shares at $50.05.
- It matches 1,500 shares at $50.10.
- The next level, $50.20, is above your limit, so no further matching occurs.
- The unfilled 3,500 shares are cancelled.
You bought 6,500 shares. The total cost is (3,000 × $50.00) + (2,000 × $50.05) + (1,500 × $50.10) = $150,000 + $100,100 + $75,150 = $325,250, an average of about $50.04 per share. No resting bid remains, so no other participant can see your remaining demand.
The same order in rupees would behave identically: only the currency changes, for instance a limit of ₹500.10 against ask levels in the same shape.
Why it matters to investors
Control over market impact. A large resting order signals your intentions. IOC lets a trader take liquidity that is already visible, in measured pieces, without advertising the rest. This relates to market impact and slippage.
Price discipline. Because the limit price caps what you pay, you avoid chasing the market into thin, expensive levels of the book.
No unintended leftovers. A standard limit order can sit unfilled and execute later at a time you no longer want. An IOC order cannot, which suits situations where the opportunity is only valid right now.
Use in larger orders. Institutions and algorithmic systems often split a big order into many IOC slices, sent to different venues or at different moments. Each slice takes what is available and disappears. Retail investors rarely need this, but it is useful to understand because it shapes how liquidity behaves on screen.
IOC compared with similar orders
- Fill-or-kill order: also immediate, but must fill entirely or be cancelled in full.
- All-or-none order: requires a full fill but is not necessarily immediate; it can wait.
- Day order: remains active until the end of the trading session.
- Good-till-cancelled order: remains active until filled or cancelled, subject to broker limits.
What to watch out for
- Incomplete execution. You may receive far less than you wanted, or nothing at all, if the book is thin at your price. Confirm your fill before assuming your position size.
- Fragmented fills. Several small executions can each attract a per-trade charge with some brokers. Check your fee schedule.
- Limit set too tight. A limit very close to the current price may leave most of the order cancelled, especially in a fast market.
- Limit set too loose. Without a sensible cap, an IOC order can sweep several price levels and cost more than expected.
- Thin or fast markets. Outside regular hours or around news, displayed liquidity can vanish between the moment you see it and the moment your order arrives.
- Venue differences. Rules on partial fills, minimum quantities and supported instruments are set by each exchange and broker.
This entry is educational and does not suggest that any order type suits a particular person or security.
Related concepts
IOC sits within the family of order instructions that govern price and timing. Understanding the bid-ask spread, market depth and liquidity helps explain why an IOC order fills as it does.