
Immediate or Cancel (IOC) orders are a critical execution tool for traders who need flexibility with order fills. Unlike more rigid order types, IOC orders allow you to get partial fills while automatically canceling any unfilled portion of your order. This makes them particularly valuable for automated trading strategies where precision and speed matter.
An Immediate or Cancel order is a time-in-force instruction that requires your order to execute as much as possible immediately, then automatically cancels any remaining unfilled portion. If you place an IOC order to buy 100 shares and only 60 shares are available at your specified price, you'll receive those 60 shares and the remaining 40 will be canceled rather than waiting in the order book.
This differs fundamentally from standard limit orders that remain active until filled or manually canceled. IOC orders prioritize speed and certainty over waiting for complete fills.
The key distinction between IOC and Fill or Kill (FOK) orders comes down to partial fills:
As one trader explained: "Immediate or Cancel will even allow you to have a partial position open. So it'll fill as much as it can. But if it can't get the whole order filled, you'll still have whatever you were able to fill. Whereas Fill or Kill means I want this whole trade to be filled—100 shares I want to buy. I got to get them all right now or forget it."
IOC orders excel in specific trading scenarios:
When executing multiple rapid trades, IOC orders prevent your orders from lingering in the market and creating unintended exposure. You get immediate execution feedback and can move on to the next trade.
During volatile periods or news events, prices can shift rapidly. IOC orders ensure you capture available liquidity at your target price without risking slippage from waiting orders.
When entering large positions, IOC orders let you accumulate shares gradually across multiple price levels without committing to a full fill at potentially worse prices.
IOC orders allow you to test market depth without commitment. You can gauge how much size is available at specific price points.
Not all brokers support every order type variation. Broker capabilities vary based on their routing infrastructure and supported exchanges. Major brokers typically offering IOC orders include:
To determine what your broker allows, check their documentation or contact customer support directly. As noted in the trading community: "They don't have documentation that's very clear. You're always able to reach out to customer support with the broker to answer those types of questions."
An important consideration for strategy development is that IOC orders may not work identically in paper trading environments versus live accounts. Paper trading systems often lack the granular order type support found in production environments.
When testing strategies with specialized order types like IOC, connect your paper trading account with the actual broker you plan to use live. This simulates more realistic execution behavior and helps identify any order type limitations before committing real capital.
TradersPost supports advanced order types including IOC orders across multiple broker integrations. When building automated strategies, you can specify IOC time-in-force parameters to ensure your strategy executes with the precise behavior you need.
This is particularly valuable when automating signals from TradingView or other platforms where execution speed and partial fill handling matter. You can design strategies that take advantage of IOC order characteristics to improve fill rates and reduce market impact.
Beyond time-in-force specifications, you can also control price execution through bid-ask spread positioning. Rather than using the last traded price, you can specify:
Combining IOC time-in-force with strategic price selection gives you precise control over execution characteristics. For example, using ask price with IOC ensures immediate fill of available quantity for buy orders.
Before deploying any strategy using IOC orders, follow this testing sequence:
Confirm your broker explicitly supports IOC orders for your target instruments. Some brokers only support IOC for certain asset classes.
Use your broker's paper trading environment rather than generic simulators. This reveals actual order type handling.
Execute test trades with minimal size to validate real-world execution behavior matches expectations.
Track what percentage of your IOC orders achieve full versus partial fills. This informs position sizing decisions.
Traders frequently encounter these issues when implementing IOC orders:
IOC orders are designed for partial fills. If your strategy requires full position entry, FOK orders are more appropriate.
Always check execution reports after IOC orders. You need to know exactly what quantity filled to manage position sizing accurately.
IOC orders work best with sufficient liquidity. In thin markets, you'll likely get minimal partial fills.
Rapidly executing multiple IOC orders can move prices against you. Space out executions or use limit prices further from market.
Automated trading platforms like TradersPost excel at managing IOC order complexity. You can program conditional logic such as:
This level of execution control transforms IOC orders from simple tools into sophisticated strategy components.
While we've focused primarily on equities, IOC orders function similarly across markets:
Most equity brokers support IOC for listed securities. Execution is typically fast with good fill rates for liquid names.
Futures markets often have excellent IOC support given the prevalence of algorithmic trading. Partial fills are common.
Currency pairs with deep liquidity work well with IOC orders. Be aware of spread costs with partial fills.
Crypto exchange support varies widely. Check specific exchange order type documentation before implementing IOC strategies.
Experienced traders leverage IOC orders in sophisticated ways:
Submit sequential small IOC orders rather than displaying full size. This mimics iceberg order behavior without requiring special order types.
Use simultaneous IOC orders on bid and ask to capture spread. Partial fills on either side still generate profit.
IOC orders can validate breakout strength. If an IOC order above resistance fills completely, it confirms buying pressure.
IOC exit orders ensure you capture available liquidity during adverse moves without waiting for complete fills.
Immediate or Cancel orders provide the flexibility needed for modern trading strategies. By allowing partial fills while canceling unfilled portions instantly, IOC orders give you control over execution without lingering market exposure.
Whether you're implementing high-frequency strategies, trading volatile markets, or building position size gradually, IOC orders offer valuable execution characteristics. The key is understanding when they're appropriate versus other order types like Fill or Kill or standard limits.
For automated traders using platforms like TradersPost, IOC orders become even more powerful. You can program sophisticated execution logic that adapts to market conditions while maintaining precise control over fill behavior. Test thoroughly with your specific broker, understand the limitations, and incorporate IOC orders into your trading toolkit for improved execution quality.