Skip to main content
๐Ÿ“– Tronsell Wiki

FOK Order Explained

A complete guide to understanding FOK (Fill-or-Kill) orders on cryptocurrency exchanges. Learn what a FOK order is, how it works, and when to use it.

๐ŸŽฏ Quick Facts โ€” FOK Orders
Purpose Full fill or complete cancellation
Execution Immediate (all-or-none)
Partial Fill Not allowed
Best For Requiring exact order size

๐Ÿ” Introduction: What Is a FOK Order?

A FOK (Fill-or-Kill) order is a type of order that requires the entire order to be filled immediately. If the exchange cannot fill the full quantity of the order at the time it is placed, the entire order is canceled. No partial fills are allowed.

FOK orders are used by traders who require the exact order size and do not want to be left with a partial position. They are particularly useful for large orders, when you need to ensure you get the full position size, or when you are testing the market depth.

โš ๏ธ Important

FOK orders are "all-or-none" โ€” either the full order fills immediately, or it is completely canceled. There is no partial execution.

โš™๏ธ How a FOK Order Works

When you place a FOK order, the exchange attempts to fill the entire quantity immediately at the best available price (or within your limit price). If the full quantity is available, the order fills completely. If not, the order is immediately canceled.

Example: You place a FOK order to buy 10 BTC at a limit price of $60,100. The order book has:

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

Since the total available liquidity within your limit price is 10 BTC, the full order fills. If only 9 BTC were available, the entire order would be canceled.

FOK orders can be placed as either limit FOK (with a limit price) or market FOK (executed at the best available price, but only if the full quantity is available).

๐Ÿ’ก Pro Tip

Use a limit FOK 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) while still requiring a full fill.

โœ… When to Use a FOK Order

FOK orders are ideal in the following scenarios:

๐Ÿ“Š
Full Position Size Required

When you need the exact order size and cannot accept a partial position.

๐Ÿ”
Testing Market Depth

FOK orders are useful for testing whether the market has enough liquidity to fill a large order.

๐Ÿ“ˆ
Large Institutional Orders

Institutional traders often use FOK orders to execute large block trades without leaving a market footprint.

โšก
Avoiding Partial Positions

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

๐Ÿ’ก Pro Tip

Use FOK orders when you are executing a strategy that requires a specific position size, such as hedging or portfolio rebalancing.

โš–๏ธ FOK vs. IOC (Immediate-or-Cancel)

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

Feature FOK IOC
Definition Fill-or-Kill Immediate-or-Cancel
Partial Fill Not allowed (all-or-none) Allowed (unfilled portion canceled)
Order Cancellation Entire order canceled if not fully filled Only unfilled portion canceled
Best For Requiring exact order size Testing liquidity, partial execution acceptable
Price Control Yes (if limit FOK) Yes (if limit IOC)
๐Ÿ’ก Recommendation

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

โš–๏ธ FOK vs. Market vs. Limit Orders

Understanding the differences between these order types is essential:

Feature FOK Market Limit
Execution Immediate (all-or-none) Immediate When limit price is reached
Partial Fill Not allowed Allowed Allowed
Unfilled Portion Canceled (if not fully filled) Remains (partial fill possible) Remains in order book
Price Control Yes (with limit FOK) No Yes
Best For Full fill requirement Urgent trades Price control & saving fees
๐Ÿ’ก Recommendation

Use FOK when you need the exact order size. Use market orders for urgency, and limit orders for price control and lower fees.

โš ๏ธ Risks of Using FOK Orders

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

  • Order Cancellation: Your order may be entirely canceled if there is not enough liquidity to fill the full quantity, causing you to miss the opportunity.
  • Worse Average Price: If the order fills, it may fill at multiple price levels, resulting in a higher average price (for buys) or lower average price (for sells).
  • Not Suitable for Thin Markets: In low-liquidity markets, FOK orders are likely to be canceled.
  • May Not Fill in Fast Markets: In rapidly moving markets, the available liquidity may change quickly, causing your FOK order to be canceled.
๐Ÿ“Œ Example

You place a FOK order to buy 10 BTC at a limit price of $60,100. Only 8 BTC are available at your limit price. Your order is entirely canceled, and you miss the opportunity to buy the 8 BTC.

๐Ÿ“ How to Set Up a FOK Order

Follow these steps to place a FOK 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 "FOK" or "Fill-or-Kill" as the order type.

  • 3
    Set your limit price (optional)

    If using a limit FOK, 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 FOK order.

๐Ÿ’ก Pro Tip

If you are using FOK with a limit price, ensure your limit price is realistic and there is sufficient liquidity at that level to fill your order.

โœ… Best Practices for FOK Orders

  • Check order book depth: Before placing a FOK order, check the order book to estimate whether your full order can be filled.
  • Use limit FOK for price control: If you care about the price, use a limit FOK order to cap your execution price.
  • Avoid FOK during low liquidity: In low-liquidity markets, FOK orders are likely to be canceled.
  • Monitor order status: If your FOK order is canceled, decide whether to place a new order or adjust your strategy.
  • Combine with other orders: If a FOK order is canceled, consider placing a limit order for the remaining amount.
๐Ÿ“Œ Final Recommendation

FOK orders are powerful tools for requiring exact order sizes. Use them wisely, and always consider the trade-off between full execution and the risk of cancellation.

โ“ Frequently Asked Questions

What is a FOK order on an exchange?

A FOK (Fill-or-Kill) order is a type of order that requires the entire order to be filled immediately. If it cannot be fully filled, the entire order is canceled. No partial fills are allowed.

When should I use a FOK order?

Use a FOK order when you require the exact order size and do not want partial fills. It is useful for large orders, when you need to ensure you get the full position size, or when you are testing the market depth.

What is the difference between FOK and IOC orders?

FOK requires the entire order to be filled immediately; if not, the order is canceled entirely. IOC allows partial fills and cancels only the unfilled portion. FOK is 'all-or-none', while IOC is 'as much as possible, then cancel'.

What are the risks of using a FOK order?

The main risk is that your order may be entirely canceled if there is not enough liquidity to fill the full quantity. This could result in missing the opportunity if the market moves quickly.

Can I use FOK with a limit price?

Yes, you can place a limit FOK 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 a full fill.

Are FOK orders available on all exchanges?

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

What happens if a FOK order is partially filled?

A FOK order cannot be partially filled. If the full order cannot be filled immediately, the entire order is canceled. No partial execution occurs.

๐ŸŽฏ Execute Full Orders with FOK

Use FOK orders to ensure you get the exact position size you need. Tronsell provides energy solutions for efficient USDT transactions.