fill or kill order

Fill or Kill (FOK) order is a type of trading instruction that requires the specified quantity to be fully executed immediately upon submission; otherwise, the entire order is canceled. Partial fills are not accepted. FOK orders are commonly attached to limit orders and are used in both spot and derivatives trading. In on-chain environments, this can be achieved through atomic transactions to ensure "all-or-nothing" execution. This method is suitable for scenarios that demand strict adherence to both price and quantity in a single execution, but users should carefully consider the trade-off between execution certainty and opportunity cost.
Abstract
1.
Fill or Kill (FOK) is an order type that requires immediate and complete execution of the entire order, or the order will be canceled entirely.
2.
FOK orders do not allow partial fills, ensuring traders either get the full quantity at the desired price or no execution at all.
3.
Ideal for large-volume trades where price sensitivity is critical, preventing average cost changes from partial fills.
4.
In markets with low liquidity, FOK orders may be frequently canceled, making them more suitable for trading highly liquid assets.
fill or kill order

What Is a Fill or Kill (FOK) Order?

A Fill or Kill (FOK) order is a type of "all-or-nothing, immediate execution" order. Upon submission, the order must be completely filled at the specified quantity right away, or else it is immediately canceled in its entirety.

On exchange order books, this instruction is typically attached to limit orders as an “order duration/execution condition.” It emphasizes two key points: the order must be executed instantly and in full. If either condition is not met, the system cancels the entire order—no partial fills are allowed.

How Does a Fill or Kill (FOK) Order Work?

A Fill or Kill order relies on the matching engine to first check available liquidity. If there is sufficient liquidity to match your entire requested quantity at or below your limit buy price, or at or above your limit sell price, the trade is executed instantly in full; otherwise, the entire order is canceled.

In an order book model, FOK orders do not remain in the queue for long, as immediate execution is required. If market depth is insufficient, the system cancels the order, and your order history will show the cancellation reason. On-chain aggregators or order book DEXs achieve the same effect through atomicity—the transaction either fully completes or is entirely reverted.

Why Use a Fill or Kill Order?

Traders use FOK orders to ensure that their entire specified quantity is executed at their chosen price in a single transaction, eliminating risks and operational issues that arise from partial fills.

For those engaging in precise hedging, arbitrage, or large portfolio rebalancing, FOK orders reduce asymmetric exposure—such as when only half of a spot position gets filled while a derivatives hedge has already been established, resulting in unmatched risk.

What Is the Difference Between Fill or Kill (FOK) and Immediate or Cancel (IOC)?

The key difference lies in whether partial fills are accepted.

Example: You want to buy 1,000 tokens at $10.00. The order book only offers 700 tokens for sale between $9.99 and $10.00.

  • Using “Immediate or Cancel” (IOC): The system fills 700 tokens immediately, canceling the remaining 300. You get a partial fill.
  • Using “Fill or Kill” (FOK): Since 1,000 tokens cannot be filled at once, the entire order is canceled. You either get all 1,000 tokens or none.

In summary, IOC aims to fill as much as possible instantly, while FOK requires all or nothing.

How Does Fill or Kill (FOK) Differ from All-or-None (AON) Orders?

AON stands for "All-or-None," meaning the order must be filled completely but not necessarily immediately—it can wait on the order book until enough liquidity accumulates. In contrast, FOK demands both immediate and complete execution.

You can think of FOK as AON + IOC: both "all or none" and "immediate." Platform support varies—many exchanges do not offer standalone AON orders but do provide FOK to meet "all-or-nothing and instant" requirements.

How Do FOK Orders Interact with Limit and Market Orders?

FOK orders are most commonly used with limit orders: you set your maximum acceptable buy price or minimum acceptable sell price and require the full quantity to be executed immediately. For example, if you want to buy 10 BTC at no more than $42,100, you would place a limit order at $42,100 with the FOK condition. If the full amount can be matched, it executes; otherwise, it’s canceled.

Market orders prioritize immediate execution but don’t control price limits. To combine “full quantity” with “price cap,” traders typically use limit + FOK. Some platforms offer "market + slippage cap," which can also approximate "all-or-nothing" logic but use different mechanisms.

How to Place a Fill or Kill Order on Gate?

Step 1: Log in to your Gate account and navigate to the spot or futures trading page for your desired trading pair.

Step 2: In the order entry area, select "Limit" mode and enter your intended price and quantity.

Step 3: Expand or locate the "Advanced/Time-in-Force" options and choose "Fill or Kill (FOK)" as your execution type.

Step 4: Review your order details and submit. The system will immediately attempt to fill your order; if it cannot be fully filled at once, the order will be canceled.

Step 5: Check the status under "Orders/Fills/History." Note that FOK orders usually execute as taker trades and incur taker fees according to Gate’s current fee schedule.

What Trading Scenarios Suit FOK Orders?

FOK orders are ideal for large, one-off trades where you want to avoid price slippage and operational complexity caused by partial fills—for example, fund entry, institutional rebalancing, or matching OTC settlement with public market fills.

They are also common in event-driven strategies—such as trading on news releases—where you want a full fill at your set price immediately, or else prefer no fill to avoid excessive slippage or unwanted exposure.

What Are the Risks of Using Fill or Kill Orders?

The main risk is reduced fill certainty. In markets with insufficient liquidity, your orders may be frequently canceled without execution—causing missed opportunities. This is especially common with illiquid tokens or during off-peak hours.

Additionally, FOK orders typically act as taker orders, resulting in higher fees than maker orders; you should weigh fee rates against slippage risk. On-chain transactions that revert due to unfilled FOK logic will still incur gas costs—which can be significant during network congestion—even though no tokens are swapped.

How Are FOK Orders Implemented in Web3?

On-chain, FOK logic relies on atomicity: either the swap occurs in full at your specified quantity and price, or the entire transaction is reverted. Many aggregators provide options to “disable partial fills/enforce full fill”—if slippage limits are breached or quantities unmet, the transaction fails and rolls back.

Order book DEXs may support explicit FOK instructions; AMM-based protocols often combine slippage protection with minimum fill amounts to achieve similar outcomes. Regardless of mechanism, smart contract atomicity ensures “all-or-nothing” execution on-chain.

Key Features of Fill or Kill Orders

FOK orders emphasize immediate and complete execution—best suited for scenarios with strict quantity and price requirements. They work by checking market depth beforehand or leveraging atomic execution on-chain. Unlike IOC orders, they reject partial fills; compared to AON, they add an immediacy constraint. In practice, traders must balance certainty of execution, fees, slippage risk, and opportunity cost—and follow correct steps on platforms like Gate to ensure their instructions are executed as intended.

FAQ

What’s the difference between Fill or Kill (FOK) and All-or-None (AON)?

Both require full execution or full cancellation, but timing differs. Fill or Kill (FOK) checks for full execution instantly—if not possible, it cancels within seconds. All-or-None (AON) allows an order to remain on the book until it can be fully filled or canceled by the system. In short: FOK is more aggressive; AON is more patient.

How can I prevent large orders from being partially filled?

Using a Fill or Kill (FOK) order is the best approach. When placing an order on Gate, select this order type and set your target price—the system will attempt to execute your entire quantity at that price immediately; if not possible, it will automatically cancel the order. This protects you from slippage and risks associated with partial fills.

What happens if my FOK order never gets fully filled?

Your order will remain pending until it times out and is automatically canceled, or until market conditions change such that a full fill becomes impossible. The specific timeout period and cancellation rules depend on the exchange’s policy. Always check market liquidity before placing large FOK orders—if depth is insufficient, a full fill may be unlikely.

Which is easier to execute: IOC (Immediate or Cancel) vs FOK (Fill or Kill)?

IOC has a higher fill rate since it allows partial execution; FOK requires all-or-nothing and thus fills less frequently. Choose based on your priorities: use IOC if you must get any fill possible; use FOK if you only accept a complete fill.

What mistakes do crypto newcomers often make with FOK orders?

Common pitfalls include: setting prices too high/low so that orders never fill; ignoring insufficient liquidity; using FOK during extreme volatility causing long waits; failing to set reasonable timeouts. It’s recommended to practice with demo accounts first, monitor live depth charts closely, and select trading pairs with ample liquidity.

A simple like goes a long way

Share

Related Glossaries
fomo
Fear of Missing Out (FOMO) refers to the psychological phenomenon where individuals, upon witnessing others profit or seeing a sudden surge in market trends, become anxious about being left behind and rush to participate. This behavior is common in crypto trading, Initial Exchange Offerings (IEOs), NFT minting, and airdrop claims. FOMO can drive up trading volume and market volatility, while also amplifying the risk of losses. Understanding and managing FOMO is essential for beginners to avoid impulsive buying during price surges and panic selling during downturns.
leverage
Leverage refers to the practice of using a small amount of personal capital as margin to amplify your available trading or investment funds. This allows you to take larger positions with limited initial capital. In the crypto market, leverage is commonly seen in perpetual contracts, leveraged tokens, and DeFi collateralized lending. It can enhance capital efficiency and improve hedging strategies, but also introduces risks such as forced liquidation, funding rates, and increased price volatility. Proper risk management and stop-loss mechanisms are essential when using leverage.
wallstreetbets
Wallstreetbets is a trading community on Reddit known for its focus on high-risk, high-volatility speculation. Members frequently use memes, jokes, and collective sentiment to drive discussions about trending assets. The group has impacted short-term market movements across U.S. stock options and crypto assets, making it a prime example of "social-driven trading." After the GameStop short squeeze in 2021, Wallstreetbets gained mainstream attention, with its influence expanding into meme coins and exchange popularity rankings. Understanding the culture and signals of this community can help identify sentiment-driven market trends and potential risks.
Arbitrageurs
An arbitrageur is an individual who takes advantage of price, rate, or execution sequence discrepancies between different markets or instruments by simultaneously buying and selling to lock in a stable profit margin. In the context of crypto and Web3, arbitrage opportunities can arise across spot and derivatives markets on exchanges, between AMM liquidity pools and order books, or across cross-chain bridges and private mempools. The primary objective is to maintain market neutrality while managing risk and costs.
BTFD
BTFD (Buy The F**king Dip) is an investment strategy in cryptocurrency markets where traders deliberately purchase assets during significant price downturns, operating on the expectation that prices will eventually recover, allowing investors to capitalize on temporarily discounted assets when markets rebound.

Related Articles

Exploring 8 Major DEX Aggregators: Engines Driving Efficiency and Liquidity in the Crypto Market
Beginner

Exploring 8 Major DEX Aggregators: Engines Driving Efficiency and Liquidity in the Crypto Market

DEX aggregators integrate order data, price information, and liquidity pools from multiple decentralized exchanges, helping users find the optimal trading path in the shortest time. This article delves into 8 commonly used DEX aggregators, highlighting their unique features and routing algorithms.
2024-10-21 11:44:22
What Is Copy Trading And How To Use It?
Beginner

What Is Copy Trading And How To Use It?

Copy Trading, as the most profitable trading model, not only saves time but also effectively reduces losses and avoids man-made oversights.
2023-11-10 07:15:23
What Is Technical Analysis?
Beginner

What Is Technical Analysis?

Learn from the past - To explore the law of price movements and the wealth code in the ever-changing market.
2022-11-21 10:17:27