When you need to trade quickly but want flexibility on how much gets filled, immediate or cancel orders offer a practical solution. They execute whatever is available right now and cancel the rest. In this guide, we will explain how IOC orders work and when they are most useful.
What is an Immediate or Cancel Order?
An immediate or cancel (IOC) order is an instruction to execute as much of the order as possible immediately and automatically cancel any unfilled portion. Unlike fill or kill orders that demand everything or nothing, IOC orders accept partial fills.
The simple version: An IOC order says "Buy or sell as much as you can right now at my price, and cancel whatever you cannot fill." You get what is available immediately, and the rest disappears.
How Immediate or Cancel Orders Work
Here is the step-by-step process:
- Your order is sent to the exchange with the IOC condition
- The system immediately tries to fill as much as possible at your specified price
- Whatever amount can be filled is executed instantly
- Any remaining unfilled portion is automatically canceled
- The entire process takes a fraction of a second
IOC Order Examples
Example: Partial Fill
You want to buy 1,000 shares of Apple at $175 using an IOC order.
- Current market: 600 shares available at $175
- You place an IOC buy order for 1,000 shares at $175
- Result: You buy 600 shares at $175, remaining 400 share order is canceled
Total: You now own 600 shares of Apple at a cost of $105,000.
Example: Full Fill
You want to sell 500 shares of Microsoft at $380 using an IOC order.
- Current market: 2,000 shares of buy orders at $380
- You place an IOC sell order for 500 shares at $380
- Result: All 500 shares sell at $380
Total: You receive $190,000 from the sale (before fees).
Example: No Fill
You want to buy 500 shares at $50, but the lowest ask price is $51.
- Current market: No shares available at $50
- You place an IOC buy order for 500 shares at $50
- Result: Order cannot be filled at $50, entire order is canceled
You do not purchase any shares because none were available at your price.
When to Use IOC Orders
IOC orders work best in these situations:
- Quick entries or exits: When you want to trade now and do not want the order sitting open
- Testing liquidity: Probe the market to see how much is available at a price
- Fast-moving markets: Capture what you can before prices change
- Partial position building: Accumulate shares over time without leaving orders exposed
- Avoiding information leakage: Large orders that sit open reveal your trading intentions
Advantages of IOC Orders
- Immediate execution: You know instantly what you got
- No hanging orders: Unfilled portions do not sit in the market
- Flexibility: Accepts partial fills unlike fill or kill orders
- Price control: When used as a limit order, you control the maximum price paid
- Reduced market impact: Quick execution minimizes price movement from your order
- Privacy: Your unfilled order quantity is not visible to other traders
Disadvantages and Risks
IOC orders have some drawbacks to consider:
- Partial fills: You might only get some of what you wanted, requiring additional orders
- No second chances: If the price briefly moves away and back, you miss out
- Execution uncertainty: You do not know how much will fill until after the order
- Multiple trades: Partial fills can result in multiple executions and potentially higher commissions
- Requires active management: You may need to place multiple IOC orders to complete your position
Tip: IOC orders are particularly useful when you want to trade at a specific price without revealing your full order size to the market.
IOC vs FOK: What is the Difference?
Both order types require immediate execution, but they handle partial fills differently:
- Immediate or Cancel (IOC): Fills what it can immediately, cancels the rest
- Fill or Kill (FOK): Must fill the entire order immediately or cancel everything
Side-by-Side Comparison
You want to buy 1,000 shares but only 700 are available at your price.
- IOC result: You buy 700 shares, 300 share order canceled
- FOK result: Entire order canceled, you buy 0 shares
IOC vs Day Orders: What is the Difference?
Both order types can result in partial fills, but the timing differs:
- IOC Order: Fills immediately what it can, cancels unfilled portion instantly
- Day Order: Remains active all day, may fill gradually over hours
Use IOC when you only want what is available right now. Use day orders when you are willing to wait for fills throughout the trading session.
IOC Orders with Market vs Limit Prices
IOC orders can be combined with different price types:
- IOC Market Order: Execute immediately at best available price. Almost always fills completely for liquid stocks.
- IOC Limit Order: Execute immediately but only at your specified price or better. May result in partial fills or no fill.
Most traders use IOC with limit prices to maintain price control while getting immediate feedback.
Practical Use Cases
- News trading: Quickly enter a position when news breaks without leaving an open order
- Scalping: Day traders use IOC orders to quickly enter and exit positions
- Large order execution: Break a large order into smaller IOC orders to avoid market impact
- Options trading: Enter spread orders at a specific price without waiting
- End of day trades: Execute what you can before market close
Tips for Using IOC Orders
- Know your priority: Use IOC when speed matters more than getting the full amount
- Set realistic prices: IOC limit orders that are too far from market will not fill at all
- Monitor your fills: Keep track of partial fills and decide if you need additional orders
- Consider liquidity: IOC orders work best on liquid stocks and ETFs
- Use for large positions: Break big orders into multiple smaller IOC orders to reduce market impact
Track Your Trading Performance
Pro Trader Dashboard helps you track all your trades and analyze your execution quality. See fill rates, average prices, and optimize your order strategy.
Summary
Immediate or cancel orders give you instant execution while accepting partial fills. They are ideal when you want to trade quickly without leaving orders sitting in the market. Unlike fill or kill orders that demand everything, IOC orders take what is available and move on. They are valuable tools for active traders who prioritize speed and want to maintain control over their exposure.
Want to learn about related order types? Check out our guide on fill or kill orders or learn about day orders.