Fill or Kill (FOK)

An order that must execute completely and at once, or be cancelled outright.

Basically

Fill or kill means your whole order must happen straight away, or none of it happens. You cannot get only part of the order.

Key Takeaways

  • Fill or kill (FOK) is a time-in-force instruction that requires the entire order to be executed immediately at a specified price or better. If the full quantity cannot be filled at once, the order is cancelled with no partial execution.
  • FOK combines the all-or-nothing requirement of an all-or-none order with the immediacy of an immediate-or-cancel order. This makes it the strictest standard order type used in both traditional and high-frequency trading.
  • Crypto markets use FOK semantics in OTC desk request-for-quote workflows, centralised exchange APIs, and decentralised protocols where atomic on-chain execution guarantees all-or-nothing settlement by default.

What Is Fill or Kill?

Fill or kill (FOK) is an order instruction used in financial markets that requires the entire order to be executed immediately and completely at a specified price or better. The order is cancelled entirely if the market cannot satisfy the full quantity in a single matching attempt, with no partial fills and no portion left resting on the book.

The instruction originated in traditional equities and derivatives markets, where it is encoded as value 4 in the FIX protocol's TimeInForce field (Tag 59). FOK is classified as a time-in-force modifier rather than a standalone order type. It can be applied to limit orders and, on some venues, to market orders, dictating how long the order remains active and what happens when it cannot be fully matched.

FOK orders are relatively rare in practice compared with other time-in-force instructions like day orders or good-til-cancelled (GTC). They serve a specific purpose: ensuring that you either get exactly the position you want or stay flat, with no in-between state.

How It Works

A matching engine checks whether enough liquidity exists at your limit price or better to fill the entire order quantity. It makes this check in a single pass.

The entire process completes in microseconds on modern electronic exchanges. The order never rests on the book, never appears in the public market depth, and never leaks information about your intent if cancelled.

FIX Protocol Encoding

The FIX (Financial Information eXchange) protocol is used across most institutional trading venues. It specifies FOK in the TimeInForce field.

A new order single message (MsgType=D) with Tag 59=4 instructs the venue to apply FOK semantics. Some venues implement FOK as a synthetic instruction: CME Group, for example, treats FOK as an immediate-or-cancel order where the minimum quantity (Tag 110) equals the total order quantity, achieving the same all-or-nothing behaviour.

FOK vs. Related Order Types

FOK is often confused with similar time-in-force instructions. The key differences come down to two dimensions: whether partial fills are allowed and whether the order can wait for liquidity.

FOK is sometimes described as the combination of IOC and AON because it demands both immediacy and completeness. An IOC order takes whatever liquidity is available and cancels the remainder, while an AON order insists on full fills but can rest on the book and wait. FOK accepts neither compromise.

Large Block Trades

Institutional traders executing large positions often use FOK to avoid the risk of partial fills. A fund manager buying 50,000 shares to rebalance a portfolio needs the complete position because receiving only 30,000 shares would leave the portfolio misaligned. FOK ensures the trade either establishes the full position or leaves the portfolio unchanged.

Traders typically turn to OTC desks or dark pools when FOK orders fail because of insufficient book depth. Counterparties can source the full block there without exposing order flow to the public market.

High-Frequency and Algorithmic Trading

High-frequency trading systems use FOK orders to capture fleeting arbitrage opportunities across venues. An algorithm submits FOK orders simultaneously to multiple venues when a pricing discrepancy appears for milliseconds. The all-or-nothing constraint ensures each leg of the arbitrage either fills completely or not at all, avoiding a scenario where one leg executes but the other fails and leaves the firm with unwanted directional exposure.

Algorithmic trading strategies also use FOK when testing market depth. A rapid FOK probe reveals whether sufficient liquidity exists at a given price level without leaving any market footprint.

OTC and Request-for-Quote Workflows

Request-for-quote (RFQ) workflows on OTC desks operate with implicit FOK semantics. A client requests a price for a specific quantity, the desk quotes a firm price, and the client accepts or rejects it. An accepted trade executes at the quoted price for the full quantity with no partial fill, matching the FOK model even when the term is not explicitly used.

Crypto platforms like Paradigm and institutional OTC desks at major exchanges operate this way. They quote firm prices on large crypto derivatives blocks that execute as fill-or-kill.

Crypto Exchange Support

Major centralised crypto exchanges, including Bitfinex and others, support FOK as a time-in-force option on their trading APIs. You specify FOK alongside your limit price and quantity, and the matching engine applies the same all-or-nothing logic used in traditional markets.

The exchange rejects the order if it cannot fill all 10 BTC at $67,500 or better in a single match cycle. Your balance remains unchanged.

FOK Semantics in Decentralized Markets

Decentralised exchanges and intent-based trading systems provide fill-or-kill guarantees through atomic on-chain execution. The blockchain's transaction model provides the all-or-nothing guarantee natively instead of relying on a matching engine's time-in-force logic.

Atomic Execution on DEXs

Automated market makers and DEX aggregators either complete a swap transaction fully or revert it entirely. The smart contract reverts if the trade would cause slippage beyond your tolerance, and you retain all your tokens minus the gas fee. The protocol therefore provides FOK-equivalent behaviour.

Smart order routers split large trades across multiple liquidity sources and execute the splits atomically within a single transaction. Each leg either fills at the expected rate or the entire transaction reverts, leaving no partial state.

Intent-Based Systems and Solver Competition

Intent solvers and protocols like CoW Protocol take the FOK concept further. You sign an off-chain intent specifying the asset, quantity, and minimum acceptable price, and solvers compete to fill the order. The winning solver executes the trade atomically against its own inventory or through optimised routing, so you either receive the full fill at or above your specified price or the intent expires unfilled.

The model provides FOK semantics without the information leakage of placing an order on a public book. It combines the privacy advantages of dark pools with the all-or-nothing execution guarantee of FOK.

Why It Matters

Fill or kill addresses a fundamental problem in trading: market microstructure risk from incomplete execution. Partial fills create operational complexity when you need a specific position size because you must track multiple fill fragments, manage residual orders, and risk unfilled portions executing at worse prices as the market moves.

Payment and settlement systems apply the FOK principle through atomic settlement: a transfer either completes in full or does not happen at all. Bitcoin's UTXO model and Layer 2 protocols like Spark enforce this by design, so a transaction is either valid and included or it is not, with no partial payment state. The all-or-nothing guarantee makes payment finality on blockchains fundamentally different from traditional settlement, where partial failures and reconciliation gaps are common.

High Cancellation Rate

The strictness of FOK means many orders are cancelled without execution, especially for large orders in illiquid markets. The matching engine consistently fails to find enough resting liquidity if the bid-ask spread is wide or depth is thin. Traders relying heavily on FOK may find that their execution rate drops significantly, forcing them to switch to IOC orders or negotiate block trades through OTC channels.

Information Leakage and Gaming

Repeated FOK submissions and cancellations can reveal your intent to sophisticated market makers monitoring order flow, even though FOK orders do not rest on the book. A series of large FOK orders at the same price level signals demand, potentially causing market makers to widen spreads or adjust their quotes before you can execute.

Venue-Specific Behavior

Implementations vary across exchanges. Some venues match FOK orders only at a single price level, while others sweep multiple price levels as long as the full quantity fills. Some exchanges implement FOK as a synthetic instruction, with IOC and a minimum quantity equal to the total quantity, rather than a native order type, so you should verify your venue's specific behaviour when executing strategies that depend on precise FOK semantics.

Gas Risk on DEXs

Decentralised exchanges use a FOK-like revert mechanism that protects the trade amount but not the transaction fee. A reverted swap still costs gas, and repeated reverts can accumulate significant costs without any successful execution in volatile markets or during congestion.

The glossary entry is for informational purposes only and does not constitute financial or investment advice. Always do your own research before using any protocol or technology.

0

← All 1876 glossary terms