--- type: "Learn" title: "Immediate or Cancel (IOC) Order: Definition, Uses, Pros Cons" locale: "zh-CN" url: "https://longbridge.com/zh-CN/learn/immediate-or-cancel-order--102664.md" parent: "https://longbridge.com/zh-CN/learn.md" datetime: "2026-03-19T12:02:09.387Z" locales: - [en](https://longbridge.com/en/learn/immediate-or-cancel-order--102664.md) - [zh-CN](https://longbridge.com/zh-CN/learn/immediate-or-cancel-order--102664.md) - [zh-HK](https://longbridge.com/zh-HK/learn/immediate-or-cancel-order--102664.md) --- # Immediate or Cancel (IOC) Order: Definition, Uses, Pros Cons

An immediate or cancel order (IOC) is an order to buy or sell a security that will execute all or part immediately and then cancel any unfilled portion of the order. An IOC order is one of several "duration," or time-in-force orders, that investors can use to specify how long the order remains active in the market and under what conditions the order is canceled.

Other commonly used duration order types include fill or kill(FOK), all or none (AON), and good ‘till canceled (GTC). Most online trading platforms allow IOC orders to be placed manually or programmed into automated trading strategies.

## Core Description - An **Immediate Or Cancel Order** is a time-in-force instruction that tries to trade **right now** at your price (or better), and **cancels whatever can’t be filled immediately**. - It is designed for traders who value **speed and controlled exposure** more than completing the entire requested quantity in one shot. - The key trade-off of an **Immediate Or Cancel Order** is simple: **higher certainty of “some execution now”** versus **lower certainty of “full execution”**. * * * ## Definition and Background An **Immediate Or Cancel Order** (often shortened to **IOC order**) is a buy or sell order that is valid only for an immediate matching attempt. When the order reaches the trading venue, the matching engine tries to execute it against available opposite-side liquidity under the specified constraints: - If it is a **limit IOC**, it executes at the **limit price or better**. - If it is a **market IOC** (only where supported), it executes at the best available prices, but still only for that immediate attempt. Any shares or contracts that do not trade during that instant matching process are **automatically canceled** rather than posted to the order book. This is why an Immediate Or Cancel Order is commonly described as: **“Fill what you can now, cancel the rest.”** ### Why “time-in-force” matters “Time-in-force” tells the venue **how long your order is allowed to remain active**. IOC is one of the most time-restrictive settings. Unlike DAY or GTC orders, an Immediate Or Cancel Order is not meant to wait for future liquidity. It is meant to take currently available liquidity (if any) and then disappear. ### How IOC became common in electronic markets Modern electronic markets use standardized order instructions so matching engines can behave deterministically. As trading moved from human-intermediated environments to electronic limit order books, IOC became a widely supported option because it: - gives traders a predictable order lifetime, - reduces the risk of an order “hanging” in the book, - supports smart routing and algorithmic slicing where immediacy is required. ### Core execution mechanics (plain English) An Immediate Or Cancel Order interacts with the order book like this: - It arrives at the venue. - The system checks available opposite orders that meet your price rule. - It executes as much quantity as possible immediately. - It cancels the remaining unfilled portion instantly. The definition is simple, but the outcome depends heavily on **liquidity**, **spread**, **depth**, and the exact **limit price** you set. * * * ## Calculation Methods and Applications ### What you can measure (without overcomplicating it) An Immediate Or Cancel Order is less about complex formulas and more about measurable execution outcomes. Two practical metrics are commonly used in trading and execution analysis: #### Fill rate (how much you actually got) Fill rate helps you quantify how effective your Immediate Or Cancel Order was at capturing liquidity at your chosen price. \\\[\\text{Fill Rate}=\\frac{\\text{Executed Quantity}}{\\text{Submitted Quantity}}\\\] - If you submit 10,000 shares and 6,500 execute, your fill rate is 0.65 (65%). - IOC strategies often accept that the fill rate may be meaningfully below 100%, especially in thin books. #### Canceled remainder (how much disappeared) Because an Immediate Or Cancel Order cancels whatever doesn’t fill, tracking the leftover quantity is essential for risk control and follow-up decisions. \\\[\\text{Canceled Quantity}=\\text{Submitted Quantity}-\\text{Executed Quantity}\\\] This number matters operationally: it tells you what exposure you _didn’t_ obtain (or didn’t exit), and therefore what action you may need next. ### Where the Immediate Or Cancel Order is typically applied An Immediate Or Cancel Order is a **speed-and-liquidity tool**. It is commonly used in situations like: #### Capturing visible liquidity without leaving a resting order If you see a temporary pocket of size on the order book and want to participate immediately without leaving instructions behind, an Immediate Or Cancel Order attempts to take that liquidity and then vanish. #### Reducing exposure to later price changes A resting limit order can be filled later, potentially when conditions have changed. With an Immediate Or Cancel Order, any execution happens immediately (if it happens at all), so you reduce the chance of an unintended later fill. This does not eliminate market risk. #### “Probing” the market for executable size Traders sometimes use an Immediate Or Cancel Order to test how much liquidity is actually available at a price level. The immediate fill (or lack of it) provides quick feedback, which can be useful in fast decision cycles. #### Algorithmic order slicing (conceptual application) Execution algorithms may break a larger target into smaller attempts, and use Immediate Or Cancel Order submissions to control time-in-market. The goal is not to guarantee completion in one attempt, but to keep each attempt short-lived and measurable. ### A simple numbers-based illustration (hypothetical scenario, not investment advice) Assume the best ask and nearby depth for a stock looks like this: Ask Price Shares Available (Displayed) $25.00 1,200 $25.01 2,000 $25.02 3,500 You submit a **buy limit Immediate Or Cancel Order** for 10,000 shares with a limit of $25.01. - Executable within your limit: 1,200 @ $25.00 + 2,000 @ $25.01 = 3,200 shares - Remaining shares (10,000 − 3,200) cancel immediately That is the core behavior of an Immediate Or Cancel Order: immediate partial fill, automatic cancellation of the remainder. * * * ## Comparison, Advantages, and Common Misconceptions ### IOC vs other time-in-force choices A quick comparison helps clarify what makes an Immediate Or Cancel Order unique: Order Type Partial Fill Allowed? Must Be Immediate? What Happens to Unfilled Portion? Immediate Or Cancel Order (IOC) Yes Yes Canceled Fill-or-Kill (FOK) No Yes Entire order canceled if not fully filled All-or-None (AON) No No (may rest) Typically rests until filled or canceled Good-’Til-Canceled (GTC) Yes or No No Stays active until filled, canceled, or expired by rules ### Advantages of an Immediate Or Cancel Order #### Strong control over “time exposure” The Immediate Or Cancel Order does not linger. That can reduce exposure to later price movement compared with resting orders, but it does not remove the risk of adverse price movement during execution. #### Partial fills are allowed (unlike FOK) If “some execution now” is useful, an Immediate Or Cancel Order can be more flexible than fill-or-kill instructions. #### Cleaner order book footprint Because the remainder cancels automatically, you avoid leaving an obvious resting order that could signal ongoing interest. ### Limitations and costs to plan for #### Uncertain final size The main operational drawback is that you may end up with a smaller executed quantity than intended, or no execution at all. #### Potentially more trades, more complexity An Immediate Or Cancel Order can fill across multiple price levels (up to your limit), creating multiple prints. That can complicate tracking average execution price and may increase ticket-related costs depending on the venue and broker. #### Not ideal for very illiquid markets When spreads are wide and depth is thin, Immediate Or Cancel Order attempts may frequently cancel. In those conditions, execution may require a different approach (for example, patience via DAY or GTC, or a different price choice). ### Common misconceptions (and the correct interpretation) #### “Immediate Or Cancel Order guarantees execution” It does not. The Immediate Or Cancel Order ensures only that **any execution that occurs happens immediately**. If there is insufficient liquidity at your price, the remainder cancels, or the entire order cancels with zero fill. #### “Canceled means rejected” A canceled remainder is not a rejection. With an Immediate Or Cancel Order, cancellation is the normal, built-in outcome for any unfilled quantity. Always check the execution report to see what filled before sending any replacement order. #### “IOC is the same as FOK” They are different by design. Immediate Or Cancel Order allows partial fills. FOK does not. If partial execution would create problems (for example, leaving you under-hedged), IOC may not be suitable. #### “A tight limit is always safer” A tighter limit can reduce price slippage risk, but under an Immediate Or Cancel Order it can also reduce the chance of any fill. With IOC, there is no time to wait for price to come to you. * * * ## Practical Guide ### When to consider using an Immediate Or Cancel Order An Immediate Or Cancel Order is typically considered when: - timing matters more than completing the full quantity, - you want immediate feedback on available liquidity, - you do not want any residual order resting in the book, - you can operationally handle partial fills. ### A step-by-step checklist (usable for many platforms) #### Define the objective before clicking “send” Be explicit about what you want: - Are you trying to reduce exposure quickly? - Are you trying to capture displayed liquidity at a specific level? - Are you testing the book to see how much size is available? If full completion is mandatory, Immediate Or Cancel Order behavior may conflict with your goal. #### Prefer IOC-limit for most non-urgent situations A marketable IOC can execute at prices that move quickly if liquidity is thin. Many traders use **limit Immediate Or Cancel Order** to cap worst-case price, but a limit does not guarantee execution. #### Use the order book (not the last trade) to set the limit The last traded price can be stale. For an Immediate Or Cancel Order, what matters is the **current bid/ask and depth**. - If the spread is wide, a limit near the last trade may result in no fill. - If you need a higher fill probability, the limit typically needs to be closer to the opposite quote, while still respecting your risk controls. #### Decide what partial fill is “worth it” Small fills can be operationally inconvenient. Before placing the Immediate Or Cancel Order, decide: - If you only fill 5% to 10%, will you still continue? - Would you rather send smaller slices? #### Plan the next step for the canceled remainder Because the remainder cancels immediately, your plan should not end at submission. Decide in advance whether you will: - try again at the same price, - adjust the limit, - switch time-in-force, - stop and reassess due to changing liquidity or volatility. ### Case study (hypothetical scenario, not investment advice) A trader wants to buy 5,000 shares of a U.S.-listed stock during a fast-moving session. The top of book and nearby depth are changing quickly. At one moment, the visible offers look like: Ask Price Shares $10.00 200 $10.01 300 $10.02 700 $10.05 2,500 The trader submits a **buy limit Immediate Or Cancel Order**: - Quantity: 5,000 shares - Limit: $10.01 - Time-in-force: IOC **What can happen:** - The order can fill 200 shares @ $10.00 and 300 shares @ $10.01 = 500 shares executed. - The remaining 4,500 shares are canceled immediately. **How the trader uses the result:** - The executed 500 shares indicate some liquidity at the desired level. - The immediate cancellation prevents a resting order from being filled later at a time the trader did not intend. - The trader can then choose whether to raise the limit, wait for liquidity to refresh, or change tactics. Any follow-up decision should consider execution risk and market risk. ### Practical risk controls for repeated IOC attempts If you submit multiple Immediate Or Cancel Order attempts (manually or systematically), consider controls such as: - maximum number of retries, - maximum acceptable limit drift (price deviation), - a cooldown time after volatility spikes, - a hard cap on total notional submitted. These guardrails are less about predicting price and more about managing operational risk when markets become unstable. * * * ## Resources for Learning and Improvement ### Exchange and venue rulebooks Order-type behavior can vary in details (for example, handling during halts, auctions, or special sessions). The most reliable definitions of Immediate Or Cancel Order behavior are in exchange rulebooks and technical specifications. ### Broker order-type documentation Brokers may implement routing logic, support specific time-in-force settings only on certain venues, or display partial fills in a particular way. Read your broker’s documentation for: - whether IOC is supported for the product you trade, - how partial fills are reported, - whether the order can sweep multiple price levels up to your limit, - fee schedules that may apply to liquidity-taking executions. ### FIX protocol references (for advanced learners) If you want to understand how an Immediate Or Cancel Order is transmitted institutionally, FIX documentation explains the standardized “time-in-force” instruction and cancellation semantics. ### Market microstructure texts For deeper context, such as why immediate execution can be costly in spreads and impact, and why partial fills happen, market microstructure resources are helpful. They explain how order books, liquidity, and adverse selection shape IOC outcomes. ### Execution quality and post-trade analytics If you trade actively, learn to review: - fill rate, - canceled quantity, - effective execution price versus your limit, - frequency of micro-fills, - how results change across times of day and volatility regimes. * * * ## FAQs ### What is an Immediate Or Cancel Order in one sentence? An **Immediate Or Cancel Order** is a buy or sell order that tries to execute immediately at your price (or better) and cancels any portion that cannot be filled right away. ### If my Immediate Or Cancel Order partially fills, what happens to the rest? The unfilled remainder is automatically canceled. Only the executed quantity becomes your final position change from that order. ### Can an Immediate Or Cancel Order result in zero execution? Yes. If there is no available liquidity at prices that satisfy your order constraints (for example, your limit is too strict), the Immediate Or Cancel Order can cancel entirely with no fill. ### Is an Immediate Or Cancel Order the same as Fill-or-Kill (FOK)? No. A Fill-or-Kill order must be filled completely immediately or it cancels entirely. An **Immediate Or Cancel Order** allows partial fills and cancels only the remainder. ### Does “canceled” mean something went wrong? Not necessarily. With an **Immediate Or Cancel Order**, cancellation is a normal outcome for any unfilled quantity. You should check the trade confirmation to see what executed before taking further action. ### Should I use IOC-market or IOC-limit? Many traders prefer **IOC-limit** to control price. An IOC-market (where available) may increase the chance of immediate execution, but can result in unfavorable pricing if liquidity is thin or the book is moving quickly. ### Why do I sometimes get many small fills with an Immediate Or Cancel Order? Because the order may match across multiple price levels or venues up to your limit, and liquidity may be fragmented. This can produce multiple execution prints and a canceled remainder. ### What is the biggest practical risk of using an Immediate Or Cancel Order? The biggest risk is **ending up with less executed size than intended**, which can require follow-up orders and may increase operational complexity and total trading costs. * * * ## Conclusion An **Immediate Or Cancel Order** is best understood as a disciplined “now-or-never” instruction: it seeks immediate execution for whatever size is available under your chosen price rules, then removes the rest automatically. This can be useful when timing and exposure control matter more than completing the full quantity in one attempt. To use an Immediate Or Cancel Order effectively, focus on realistic limit pricing, accept the possibility of partial fills, and plan in advance how you will handle any canceled remainder. > 支持的语言: [English](https://longbridge.com/en/learn/immediate-or-cancel-order--102664.md) | [繁體中文](https://longbridge.com/zh-HK/learn/immediate-or-cancel-order--102664.md)