Execution & trading costs

Fill or kill (FOK)

Fill or kill (FOK) is a time-in-force instruction requiring an order to execute in full immediately at its permitted price or better; otherwise, the entire order is canceled.

What it means

A fill-or-kill instruction makes full, immediate execution a condition of an order. If the entire requested quantity cannot execute under the order’s price terms, none of it executes. The unfilled order is canceled rather than left open.

FOK is a time-in-force instruction, not an order price. It can accompany a limit order, where the limit sets the worst acceptable price. For a buy limit, execution may occur at or below that limit; for a sell limit, at or above it. Broker and venue support and the precise treatment of “immediate” execution can vary.

FOK differs from immediate or cancel (IOC): an IOC order may execute a smaller quantity immediately and cancel the remainder. FOK does not permit a partial fill. It also differs from an ordinary day order, which may remain available for execution later that trading day.

How it is calculated

FOK is an instruction, not a return or risk metric. For a simplified buy limit order, its all-or-nothing test is execute Q shares if A(P) ≥ Q immediately; otherwise execute 0 shares and cancel.

  • Q is the order quantity, in shares.
  • P is the buy limit price, in US$ per share.
  • A(P) is the quantity, in shares, immediately available for sale at prices at or below P that the order can access.

For a sell limit, use the immediately accessible quantity offered for purchase at or above the sell limit instead. This test illustrates the rule; displayed quotes alone do not establish what a broker can actually execute. Available liquidity can change, and routing and venue rules matter.

Worked example

Suppose, hypothetically, an investor enters a FOK limit order to buy 200 shares at US$50.02 or less per share. At the moment the order is evaluated, assume the accessible sell-side liquidity is:

Asking price Shares available
US$50.00 80
US$50.02 150
US$50.05 100
  1. Count only shares within the buy limit: 80 + 150 = 230 shares. The 100 shares at US$50.05 are above the limit and do not count.
  2. Because 230 is at least 200, a full execution is possible under these hypothetical conditions. If those shares remain accessible during processing, the order can fill immediately; shares executed at different prices can have different fill prices.
  3. If instead only 180 shares were accessible at US$50.02 or less, the FOK order would execute zero shares and be canceled. It would not buy 180 shares and wait for 20 more.

The example excludes commissions and assumes the specified liquidity is accessible. It does not imply that a displayed order book guarantees a fill.

Why it matters before you trade

FOK can prevent an unwanted partial position, but its full-size requirement also makes cancellation more likely when immediately accessible liquidity is insufficient. An unfilled FOK order does not lock in a price or reserve shares. If an order is canceled, a later order is a separate attempt under potentially different market conditions.

Before placing an order, distinguish quantity, limit price, and time in force. Check whether your broker supports FOK for the security and order type, and review any applicable venue rules. Market depth, bid-ask spread, order size relative to daily volume, and possible market impact help describe execution conditions, but none guarantees that a FOK order will fill.

How PreTrAIde uses it

PreTrAIde provides pre-trade analysis of a stock basket, including each line’s side, quantity, and execution conditions. Its quantitative layer estimates spread, participation in daily volume, and market impact; it also produces liquidity and execution scores. Those measures can help frame the liquidity question relevant to a full-size immediate execution. The product facts do not establish that PreTrAIde specifically simulates FOK orders or checks a live order book for FOK eligibility.

PreTrAIde returns GO, NO-GO, or MODIFY verdicts as decision support, not execution instructions. It never receives, transmits, or executes an order; the user places any order with their own broker.

Common mistakes

  • Treating FOK as IOC: IOC may fill partly; FOK requires the entire quantity or none.
  • Treating the limit as a guaranteed fill price: A limit restricts eligible prices, but it does not guarantee execution.
  • Assuming displayed depth is firm and accessible: Quotes can change, and routing affects which liquidity an order can reach.
  • Expecting the remainder to stay open: A FOK order that cannot fill in full is canceled, not queued for later.

Frequently asked questions

Can a fill-or-kill order be partially filled?

No. A FOK order must execute its full quantity immediately under its price terms or be canceled with no execution.

What is the difference between FOK and IOC?

Both require immediate action. IOC permits an immediate partial fill and cancels the remainder; FOK permits no partial fill.

Does a FOK limit order guarantee a fill at the limit price?

No. The limit specifies the worst eligible execution price, but the full quantity must also be immediately executable; otherwise, the order is canceled.

Related terms

Execution & trading costs

Pre-trade analysis Post-trade analysis Transaction cost analysis (TCA) Bid-ask spread Effective spread Realized spread Midpoint price Slippage All glossary terms →

Check your next trade before you place it

Build a basket, run a pre-trade analysis, and get a GO, NO-GO or MODIFY verdict with the cost, liquidity and risk behind it.

Start your free trial Try the free tools

Educational content, not investment advice. PreTrAIde is analysis software, not a broker: it never executes orders, and its verdicts are decision support, not recommendations to buy or sell.