
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.
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.
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.
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.
In summary, IOC aims to fill as much as possible instantly, while FOK requires all or nothing.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.


