What Is an IOC?
Let me explain what an Immediate or Cancel order, or IOC, really is. It's an order you place to buy or sell a security that tries to execute all or part of it right away, and then it cancels whatever doesn't get filled immediately. As a trader, you should know that IOC is one of several duration or time-in-force orders that let you control how long your order stays active in the market and when it gets canceled.
You'll find other common types like fill or kill (FOK), all or none (AON), and good ‘till canceled (GTC). Most online platforms let you place IOC orders manually or even program them into your automated trading setups.
Key Takeaways
Here's what you need to remember about IOC orders: they aim to execute immediately and cancel any unfilled portion. They only need a partial fill and can be set as either limit or market orders. IOC fits into the category of duration orders alongside FOK, AON, and GTC.
How IOC Works
When you submit an IOC, you can choose between a limit or market version based on what you need for execution. An IOC limit order goes in at a specific price, while an IOC market order doesn't have a price attached—it just takes the best offer for buys or the best bid for sells.
What sets IOC apart from other duration orders is that it accepts partial fills. In contrast, FOK and AON require the entire order to fill or they cancel completely. GTC orders stay active until they're executed or you cancel them, though brokers often auto-cancel them after 30 to 90 days.
When To Use an IOC Order
You'd typically use an IOC when you're dealing with a large order and want to avoid fills at different prices. The order automatically cancels any unfilled part right away. For example, if you place an IOC to buy 5,000 shares of IBM, anything not bought immediately gets canceled.
If you're trading multiple stocks in a day, an IOC can help you avoid the risk of forgetting to cancel orders at the end of the session. Overall, these orders give you more flexibility to limit risk, speed up execution, and possibly get better prices.
Example
Suppose you place an IOC market order to buy 1,000 shares of Apple (AAPL). The order book shows 2,000 shares bid at $170.95 and 500 offered at $171.00. Your order would fill 500 shares at $171 immediately and cancel the remaining 500.
In another case, say you place an IOC limit order to buy 1,000 shares of Apple at $169 when it's offered at $170 during market open. If the S&P 500 drops later and someone offers 700 shares at $169, your order won't fill because it was already canceled after not executing initially.
What Are the Benefits of Using IOC?
IOC limit orders protect you from bad fills in fast-moving or illiquid markets. On the flip side, IOC market orders make sure you get a complete or partial execution in a stock that's trending strongly with high demand.
How Does IOC Affect Market or Limit Orders?
A market order buys or sells at the best available price and executes immediately. A limit order sets a specific price or better. Both can include timing like IOC to add restrictions and instructions.
What Does Time in Force Mean for Market Traders?
As a trader, you use time-in-force instructions to specify how long your order stays active before it executes or expires.
The Bottom Line
To wrap this up, an IOC is your go-to order for buying or selling a security that executes what it can immediately and cancels the rest, all through time-in-force rules. Use IOC limit orders to shield yourself in volatile markets, and IOC market orders to secure executions in high-demand scenarios.
Other articles for you

Yield in finance represents the earnings generated from an investment, expressed as a percentage of the invested amount or value.

The secondary market is where investors trade securities among themselves after initial issuance in the primary market, providing liquidity and price discovery.

A new fund offer (NFO) is the initial subscription opportunity for investors to buy into a newly launched fund from an investment company, similar to an IPO but often less aggressively marketed.

An aptitude test evaluates a person's natural abilities and potential success in specific fields or tasks.

A perpetuity is a financial instrument that provides endless cash flows without an end date, used in valuation models despite being rare in practice.

The SEC is a U.S

Termination of employment occurs when an employee's work with a company ends, either voluntarily or involuntarily, for various reasons including performance issues or company restructuring.

A vanishing premium is a life insurance feature where accumulated cash value and dividends eventually cover the policy's premiums, eliminating the need for out-of-pocket payments.

A conglomerate is a large corporation that owns controlling stakes in multiple independent businesses, often across different industries, to diversify risks and operations.

The indirect method adjusts net income for non-cash items to calculate cash flow from operations, contrasting with the direct method's listing of actual cash flows.