# IOC and FOK Orders

> Immediate or cancel and fill or kill orders must trade at once or be cancelled. Learn how they differ, when traders use them and how partial fills are handled.

Source: https://learn.tradelabsai.com/orders/ioc-and-fok-orders/  
Track: Orders and Execution · Level: Intermediate · Updated: 2026-10-03  
Publisher: TradeLabs AI (https://tradelabsai.com). Education, not financial advice.  
Cite as: TradeLabs Learn, "IOC and FOK Orders", https://learn.tradelabsai.com/orders/ioc-and-fok-orders/

Immediate or cancel (IOC) and fill or kill (FOK) are time in force instructions for orders that must trade **right now** or not at all. Neither type ever rests in the order book. They are used when a trader wants to take whatever liquidity is available at acceptable prices without leaving a visible order behind.

## Immediate or cancel (IOC)

An IOC order fills as much as possible immediately, at your limit price or better, and cancels any remainder.

**Example: An IOC buy order**
The order book offers 300 shares at $25.00 and 500 at $25.02. You send an IOC buy limit for 1,000 shares at $25.01.
You get 300 shares at $25.00. The 500 at $25.02 are above your limit, so the remaining 700 shares are cancelled immediately. You end with a partial fill of 300 and no resting order.

## Fill or kill (FOK)

A FOK order must fill **completely** and immediately, or it is cancelled entirely.

**Example: The same order as FOK**
With the same book, a FOK buy limit for 1,000 shares at $25.01 cannot be completed, because only 300 shares are available at or below $25.01. The whole order is cancelled and you buy nothing.

## Side by side

| | IOC | FOK | Normal limit (day or GTC) |
|---|---|---|---|
| Must trade immediately | Yes, whatever it can | Yes, all of it | No |
| Partial fills | Allowed | Not allowed | Allowed |
| Remainder | Cancelled | Whole order cancelled | Rests in the book |
| Visible in the book | Never | Never | Yes |

## Why traders use them

- **Avoid leaving information in the book.** A large resting order can signal your intentions to others. IOC orders take liquidity without showing your hand.
- **Avoid unwanted fills later.** If you only want to trade at current prices, a resting order could fill after conditions change.
- **All or nothing needs.** An arbitrage or hedging trade may only make sense if the full size fills at once; a partial fill would leave an unhedged position. FOK protects against that.
- **Sweeping multiple venues.** Algorithms often send IOC orders to several venues at once to collect available liquidity quickly. See [Order Routing and Smart Order Routing](https://learn.tradelabsai.com/orders/order-routing/).

## IOC, FOK and market orders

An IOC order with a limit set beyond the current price behaves much like a market order with protection: it takes the liquidity available up to your limit and never chases further. Many algorithmic and professional traders use limit IOC orders instead of market orders for this reason.

## Related: all or none

An **all or none (AON)** order also requires a complete fill, but unlike FOK it does not have to fill immediately. It can wait in the book until enough size is available. See [All or None Orders](https://learn.tradelabsai.com/orders/all-or-none-orders/).

## Where you will see them

- **Crypto exchanges:** IOC and FOK are standard options on most order tickets.
- **Professional stock and futures platforms:** available on most direct access platforms.
- **Retail stock apps:** often not offered, or offered only on advanced tickets.

## Common mistakes

- **Expecting an IOC to rest.** If nothing fills, it is simply gone; check your fills.
- **Using FOK in thin markets,** where full size is rarely available at once, leading to repeated cancellations.
- **Forgetting partial fills from IOC orders** when calculating position size and stops.

A related instruction, all or none, requires the full quantity to fill but does not require it to happen immediately; see [All or None Orders](https://learn.tradelabsai.com/orders/all-or-none-orders/).

## Frequently asked questions

### What is the difference between IOC and FOK?

Both must trade immediately. IOC accepts a partial fill and cancels the rest; FOK must fill entirely or nothing happens.

### Can an IOC order be a market order?

Some venues allow market IOC orders, but limit IOC orders are more common because they cap the price.

### When should I use fill or kill?

When a partial fill would be worse than no fill, such as in a hedge or arbitrage that only works at full size.

## Sources

- Wikipedia, [Immediate or cancel](https://en.wikipedia.org/wiki/Immediate_or_cancel)
- Wikipedia, [Fill or kill](https://en.wikipedia.org/wiki/Fill_or_kill)

## Continue learning

- Next lesson: [All or None Orders](https://learn.tradelabsai.com/orders/all-or-none-orders/)
- Previous lesson: [Time in Force: Day, GTC and GTD Orders](https://learn.tradelabsai.com/orders/time-in-force/)
- Related: [Time in Force: Day, GTC and GTD Orders](https://learn.tradelabsai.com/orders/time-in-force/): Time in force sets how long an order stays active. Learn day orders, good till cancelled, good till date and extended hours settings, with examples and pitfalls.
- Related: [All or None Orders](https://learn.tradelabsai.com/orders/all-or-none-orders/): An all or none order must fill completely or not at all, but can wait to do so. Learn how AON orders work, why they often fill later and when they make sense.
- Related: [Limit Orders](https://learn.tradelabsai.com/orders/limit-orders/): A limit order trades only at your price or better. Learn how buy and sell limits work, why they may not fill, queue priority and how to set a smart limit price.
- Related: [The Order Book and Market Depth](https://learn.tradelabsai.com/market-structure/the-order-book-and-market-depth/): The order book lists every waiting buy and sell order by price. Learn to read market depth, what imbalances show, spoofing risks and how depth affects fills.
- Related: [Fill Probability and Queue Position](https://learn.tradelabsai.com/orders/queue-position/): Your place in the order queue decides whether a limit order fills. Learn how queues work, how to estimate fill probability and why fills can be a warning sign.
