Blockchain & Cryptocurrency Glossary

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

  • search-icon Clear Definitions
  • search-icon Practical
  • search-icon Technical
  • search-icon Related Terms

Immediate or Cancel (IOC) Order

2 min read
Pronunciation
[ɪ-ˈmiː-di-ət ɔr ˈkæn-səl ˈɔr-dər]
Analogy
Think of an IOC order as a shopper who enters a store with a specific shopping list and price limits, but only has five minutes before their taxi leaves. They'll quickly buy whatever items on their list are available at or below their maximum price, but anything they can't immediately find at their desired price, they'll abandon rather than waiting or compromising on price.
Definition
A trading order type on cryptocurrency exchanges that must be executed immediately, either partially or fully, with any unfilled portion being automatically canceled. IOC orders allow traders to capture available liquidity at their specified price without leaving lingering orders on the order book.
Key Points Intro
IOC orders serve specific purposes in cryptocurrency trading strategies.
Key Points

Immediacy: Executes against currently available liquidity without waiting for future matching orders.

Price discipline: Maintains the trader's specified price limit without slippage beyond that threshold.

Minimal market impact: Reduces market footprint by not leaving residual orders visible in the order book.

Anti-front-running: Helps prevent other traders from seeing and exploiting the trader's intentions.

Example
A trader spots a brief market inefficiency where ETH is trading slightly lower on Exchange A than Exchange B. They place an IOC buy order for 10 ETH at $3,500 on Exchange A. The order immediately fills for 6.5 ETH at $3,500 (the available liquidity at that price), while the unfilled portion (3.5 ETH) is automatically canceled without remaining visible on the order book.
Technical Deep Dive
IOC orders function by traversing the matching engine's order book from the best price level until either the order is completely filled or no more matching orders exist at or better than the specified limit price. Unlike Good-Till-Canceled (GTC) or Fill-or-Kill (FOK) orders, IOCs accept partial fills while canceling any unfilled remainder. The implementation typically requires a time priority queue in the matching engine that can efficiently process the order against existing liquidity and handle the cancellation of the remainder atomically. On decentralized exchanges, IOC functionality is implemented through smart contracts that verify available liquidity and execute swaps in a single transaction, reverting if slippage exceeds specified thresholds.
Security Warning
IOC orders don't protect against flash crashes or manipulation that occurs within the same block or transaction. On decentralized exchanges, front-running by miners/validators remains possible despite using IOC orders. Always set appropriate slippage parameters and monitor transaction execution.
Caveat
While IOC orders help manage execution risk, they may result in higher opportunity costs due to unfilled portions. During volatile periods, liquidity can disappear quickly, potentially resulting in minimal or no execution. On some exchanges, IOC orders may incur higher fees than passive limit orders that provide liquidity to the market.

Immediate or Cancel (IOC) Order - Related Articles

No related articles for this term.