Fill-or-Kill Orders

A fill-or-kill order (FOK) tells a trading venue to execute the entire stated quantity immediately or cancel the order without any fills. In a limit order, the price boundary still applies. A buy can match at the limit or lower, and a sell can match at the limit or higher. If the full quantity cannot trade at acceptable prices when the order reaches the matching engine, the order expires. Some venues call the order canceled or rejected in their status messages. Check the executed quantity to see what actually happened.
Fill or kill is a time-in-force instruction. It says how long the order can remain open and whether an immediate partial execution counts. The limit price answers a different question about what prices you accept. Keeping the two concepts separate helps when several execution choices appear near one another in an order ticket. Coinbase shares the fill-or-kill rule along with other instructions in its market trading rules.
Why a FOK order can fill at several prices
The whole quantity can match against multiple eligible resting orders. For a hypothetical limit buy, suppose three units are offered at $20.00, four at $20.10, and five at $20.30. You enter a FOK buy for seven units with a limit of $20.10. Assume all displayed orders are eligible when your order arrives.
- Three units match at $20.00 for $60.00.
- Four units match at $20.10 for $80.40.
- The seven units cost $140.40 before fees, or about $20.06 per unit on average.
Change the requested quantity to eight units with the same limit. There are still only seven available within $20.10, so the FOK has zero fills. The five units priced at $20.30 sit outside the boundary. If you raised the limit to $20.30 and the book stayed the same, the eighth unit could trade at that level. A FOK sell works from the highest eligible bid down until the full quantity can match, subject to its minimum price.
A FOK order would also cancel if one of the seven units disappeared before your first order reached the exchange. The order book shown on a phone or a trading terminal is a snapshot in time. Resting offers can be filled by another trader or canceled. A favorable preview can turn into a cancellation by the time the matching engine tests whether the order can execute.
Fill or kill vs. other time-in-force instructions
| Instruction | What can trade on arrival? | What happens to the rest? |
|---|---|---|
| Fill or kill (FOK) | The full quantity, across eligible prices if needed | The whole order ends with zero fills if a complete match is unavailable |
| Immediate or cancel (IOC) | Any available portion at eligible prices | The unmatched portion is canceled immediately |
| Good till canceled (GTC) | Any eligible portion | A valid remainder can rest until filled or canceled under venue rules |
| Good till time (GTT or GTD) | Any eligible portion | A valid remainder can rest until the specified time or date |
| All or none (AON), where offered | The full quantity if available | The order may wait for a full match, subject to venue rules |
IOC is the closest practical comparison. In the eight-unit example at $20.10, IOC could buy the seven units available and cancel the eighth. If buying any quantity helps, that outcome may be useful. If a seven-unit balance leaves you with an incomplete transfer or too little to fulfill a payment, FOK preserves the original position when the full eight cannot trade. Conversely, a regular GTC limit could fill seven immediately and leave the last unit waiting. A venue that offers only IOC may require a different workflow when the full amount is essential.
What “available” includes
The check is based on orders the matching engine can actually use. Exchanges can set price protections or trading states that limit execution. Order minimums, price steps, account balance, and self-trade restrictions can also affect whether the exchange accepts the ticket or deems particular liquidity eligible. A venue can show ten units at a price in its book while some of those units belong to you or the market changes during submission. Treat the displayed quantities as a way to estimate what may fill. The resulting status is how you verify the outcome.
A successful FOK takes resting liquidity because there was a complete immediate match. Expect the venue to classify those fills under its taker schedule, when maker and taker rates apply. A rejected or expired order with zero fills ordinarily has no fill-based trading fee. If you have a hard total budget, include the applicable fee when you decide on the order quantity and price ceiling. A limit price can cap the trade price per unit while the fee raises the total independently.
When the all-or-nothing condition is useful
Consider a trader who needs a fully funded eight-unit transfer after trading. The trader has enough cash to buy eight units within the selected price cap, and buying fewer would leave an extra balance they would still need to move or sell. A FOK order expresses that size requirement on one market. It cannot enforce the rules or delivery time for the withdrawal that follows. The trading receipt and withdrawal preview answer separate questions. In the Swapuz exchange walkthrough, for example, selecting the network and sending the specified deposit belong to the conversion flow.
In a thin market, a FOK order can expire repeatedly. Canceling quickly avoids leftover fills, and the trader can still miss a trade the next time liquidity appears after the attempt. A resting limit order would have a chance to match later, with the possibility of leaving a half-completed trade. Order size relative to available depth matters more for this choice than daily volume. High daily volume says how much has changed hands in the past. Your order uses eligible liquidity at a specific moment.
One successful FOK also covers only the order submitted to that venue. Suppose you need two trades, such as selling one asset and then using the proceeds to buy another. If the first FOK completes and the second expires, the first trade stands. Separate order instructions do not bind the two transactions together. In that situation you could end with the quote currency from the first trade and still need to find liquidity for the second.
Check the receipt before acting on the balance
- Verify that your venue and market support FOK for the intended order type. An execution policy available through an API may be absent from a simple trading interface. Coinbase Exchange order documentation.
- Review the full requested size, floor or ceiling, and projected amount including fees. Make sure you know whether quantity is entered in base or quote units.
- Confirm the order's final state and filled amount before retrying, especially if a trading interface times out or loses its connection. A lost confirmation can coincide with a successful trade.
- If several fills appear under one order, add their sizes. A complete fill can have several records when the matching engine uses different orders to cover the full quantity. Compare that sum with the quantity you submitted.
Find more crypto explainers in the Swapuz Academy.






