Skip to main content
📖 Tronsell Wiki

IOC Order Explained

A complete guide to understanding IOC (Immediate-or-Cancel) orders on cryptocurrency exchanges. Learn what an IOC order is, how it works, and when to use it.

⚡ Quick Facts — IOC Orders
Purpose Immediate execution, cancel unfilled portion
Execution Immediate (partial fill allowed)
Unfilled Portion Canceled
Best For Testing liquidity & avoiding partial fills

🔍 Introduction: What Is an IOC Order?

An IOC (Immediate-or-Cancel) order is a type of order that requires immediate execution of the entire order. Any portion of the order that cannot be filled immediately is canceled. Unlike a market order, which may leave an unfilled portion in the order book, an IOC order ensures that you do not have any residual order sitting in the book.

IOC orders are used by traders who need immediate execution and do not want to leave any unfilled portion in the order book. They are often used to test liquidity, execute large orders quickly, or to avoid partial fills.

⚠️ Important

IOC orders can be partially filled. If only part of your order is filled immediately, the unfilled portion is canceled. You may not get your desired position size.

⚙️ How an IOC Order Works

When you place an IOC order, the exchange attempts to fill it immediately at the best available price. Any portion that cannot be filled is immediately canceled. The order does not remain in the order book.

Example: You place an IOC order to buy 10 BTC. The order book has:

  • 5 BTC available at $60,000
  • 3 BTC available at $60,010
  • 2 BTC available at $60,020

Your order will fill 5 BTC at $60,000, 3 BTC at $60,010, and 2 BTC at $60,020. The full order is filled. If only 8 BTC were available, 8 BTC would fill, and the remaining 2 BTC would be canceled.

IOC orders can be placed as either limit IOC (with a limit price) or market IOC (executed at the best available price).

💡 Pro Tip

Use a limit IOC order if you want to control the maximum price you're willing to pay (for buys) or the minimum price you'll accept (for sells).

When to Use an IOC Order

IOC orders are ideal in the following scenarios:

🔍
Testing Liquidity

IOC orders are useful for testing market depth without leaving a limit order that could be filled later.

📊
Large Order Execution

When you need to buy or sell a large amount quickly, IOC ensures you get immediate execution without leaving a residual order.

Avoiding Partial Fills

If you don't want to hold a partial position, IOC ensures you either get the full fill or nothing remains.

📈
Scalping & High-Frequency Trading

IOC orders allow scalpers to enter and exit positions quickly without leaving open orders.

💡 Pro Tip

Use IOC orders when you are unsure about market liquidity and want to avoid having an unfilled order sitting in the book.

⚖️ IOC vs. Market vs. Limit vs. FOK Orders

Understanding the differences between these order types is essential:

Feature IOC Market Limit FOK
Execution Immediate (partial fill allowed) Immediate When limit price is reached Immediate (all or none)
Unfilled Portion Canceled Remains (partial fill possible) Remains in order book Canceled (if not fully filled)
Price Control Yes (with limit IOC) No Yes Yes (with limit FOK)
Best For Testing liquidity, fast execution Urgent trades Price control & saving fees Full fill requirement
💡 Recommendation

Use IOC when you need immediate execution but are okay with partial fills. Use FOK (Fill-or-Kill) when you require the entire order to be filled.

⚖️ IOC vs. FOK (Fill-or-Kill)

IOC and FOK orders are often confused. Here's the key difference:

Feature IOC FOK
Definition Immediate-or-Cancel Fill-or-Kill
Partial Fill Allowed (unfilled portion canceled) Not allowed (entire order must fill or it's all canceled)
Best For Testing liquidity, partial execution acceptable When you need the full order size
Price Control Yes (if limit IOC) Yes (if limit FOK)
💡 Pro Tip

Choose FOK if you require the exact order size. Choose IOC if you are okay with a partial fill and want the rest canceled.

⚠️ Risks of Using IOC Orders

While IOC orders are useful, they come with some risks:

  • Partial Fill: Your order may only be partially filled, leaving you with a smaller position than intended.
  • Worse Average Price: In low-liquidity markets, the order may fill at multiple price levels, resulting in a higher average price (for buys) or lower average price (for sells).
  • Missed Opportunities: If the market moves quickly, your IOC order may be canceled, and you may miss the trade.
  • Not Suitable for Large Orders: In markets with low liquidity, large IOC orders may only fill a small portion.
📌 Example

You place an IOC order to buy 10 BTC at a limit price of $60,100. Only 5 BTC are available at your limit price. The order fills 5 BTC, and the remaining 5 BTC is canceled. You end up with a smaller position than expected.

📝 How to Set Up an IOC Order

Follow these steps to place an IOC order on most exchanges:

  • 1
    Choose your trading pair

    Select the asset you want to trade (e.g., BTC/USDT).

  • 2
    Select order type

    In the order entry panel, choose "IOC" or "Immediate-or-Cancel" as the order type.

  • 3
    Set your limit price (optional)

    If using a limit IOC, enter the maximum price you're willing to pay (buy) or the minimum price you'll accept (sell).

  • 4
    Enter the amount

    Specify the quantity you want to trade.

  • 5
    Review and place the order

    Double-check your settings and click "Buy" or "Sell" to place the IOC order.

💡 Pro Tip

If you are using IOC with a limit price, ensure your limit price is realistic to avoid the entire order being canceled.

Best Practices for IOC Orders

  • Check order book depth: Before placing an IOC order, check the order book to estimate how much will fill.
  • Use limit IOC for price control: If you care about the price, use a limit IOC order to cap your execution price.
  • Avoid IOC during low liquidity: In low-liquidity markets, IOC orders may fill at unfavorable prices.
  • Combine with other orders: Use IOC to test liquidity, then place a limit order for the remaining amount if needed.
  • Monitor fill status: Check the fill status of your IOC order to know how much was executed.
📌 Final Recommendation

IOC orders are powerful tools for immediate execution and liquidity testing. Use them wisely, and always consider the trade-off between speed and price control.

Frequently Asked Questions

What is an IOC order on an exchange?

An IOC (Immediate-or-Cancel) order is a type of order that requires immediate execution of the entire order. Any portion that cannot be filled immediately is canceled. It is used to avoid partial fills or to test market liquidity.

When should I use an IOC order?

Use an IOC order when you need immediate execution and do not want to leave any unfilled portion in the order book. It is useful for testing liquidity, executing large orders quickly, or when you want to avoid partial fills.

What is the difference between an IOC order and a market order?

A market order executes at the best available price and may result in partial fills. An IOC order also executes immediately, but any unfilled portion is immediately canceled. IOC is often used with limit prices to control execution price.

What are the risks of using an IOC order?

The main risk is that your order may only be partially filled, and the unfilled portion is canceled. This may result in not achieving your desired position size. Also, if there is low liquidity, you may get a worse average price.

What is the difference between IOC and FOK orders?

IOC allows partial fills and cancels the unfilled portion. FOK (Fill-or-Kill) requires the entire order to be filled immediately; if not fully filled, the entire order is canceled.

Can I use IOC with a limit price?

Yes, you can place a limit IOC order. This sets a maximum price you're willing to pay (for buys) or a minimum price you'll accept (for sells), while still requiring immediate execution.

Are IOC orders available on all exchanges?

Most major exchanges (Binance, OKX, Bybit, KuCoin) support IOC orders. However, smaller or decentralized exchanges may not offer this feature. Check your exchange's order types.

⚡ Execute Trades Instantly with IOC

Use IOC orders for fast execution and liquidity testing. Tronsell provides energy solutions for efficient USDT transactions.