# FX Order Time-in-Force: IOC vs FOK vs GTC Diagnostics

> FIX Tag 59 TimeInForce engineering in spot FX: why Fill-or-Kill (FOK) fails on multi-LP aggregators, Immediate-or-Cancel (IOC) partial sweeps, and GTC alpha.

Canonical: https://fxopenledger.com/orderbook/limit-order-time-in-force-ioc-fok-gtc-execution-diagnostics
Last updated: 2026-11-14T19:47:28.390Z

**Publication:** FXOpen Ledger
**Category:** Lmax Ebs Ecn Spread Slippage Audit
**Published:** 2026-11-13T04:50:25.915Z
**Author:** Alistair Kerr, CFA (CFA, Former G10 Prime Brokerage & OTC Liquidity Desk Head)
**Reviewer:** Not recorded

## Answer-first summary

Choosing the wrong FIX Tag 59 Time-in-Force flag silently wrecks FX execution: Fill-or-Kill (59=4) triggers 4x higher rejection rates across fragmented multi-LP books than collared Immediate-or-Cancel (59=3) partial sweeps.

## Key takeaways

- On multi-LP FX bridges, Fill-or-Kill (Tag 59=4) suffers compounding rejection math ((1-p)^K): a 15% single-LP miss rate across 4 LPs causes 47.8% of full FOK tickets to abort while leaking full order size.
- Collared Immediate-or-Cancel (Tag 59=3 with OrdType=2 Limit Collar) is the institutional standard for FX sweeps—locking available liquidity immediately and canceling residuals with 0ms book footprint.
- MetaTrader 5 Expert Advisors that hardcode ORDER_FILLING_FOK frequently suffer unnecessary requote/reject errors on ECN bridges; dynamically negotiate ORDER_FILLING_IOC first.
- Never leave naked GTC (59=1) orders resting across macro announcements or socket drops; enforce FIX Cancel-on-Disconnect (CoD) and use GTD (59=6 + Tag 126 ExpireTime) auto-expiry.

## Related financial entities

- **FX Transaction Cost Analysis (TCA) Implementation Shortfall** (TCA-IS) — product: Quantitative post-trade execution benchmark measuring the total basis-point difference between the arrival mid-price at order inception and the final volume-weighted execution price.
- **GFXC Standardized Liquidity Provider Disclosure Cover Sheet** (GFXC-LPDS) — license: Standardized disclosure template mandated by the Global Foreign Exchange Committee to establish transparency on last-look hold times, symmetry, and pre-hedging.
- **Minimum Quote Life (MQL) ECN Rule** (ECN-MQL) — product: Electronic matching engine rule requiring resting maker limit orders to remain executable for a mandatory millisecond threshold before cancellation is permitted.

## Analysis

Inside every `FIX 4.4 NewOrderSingle (35=D)` packet—and behind every [MT5](/software/mt5) or [cTrader](/software/ctrader) execution ticket—sits a single one-byte field that dictates how the matching engine handles partial liquidity and resting queue exposure: **`Tag 59 (TimeInForce)`**. Yet algorithmic developers migrating from centralized futures exchanges routinely configure **`59=4 (Fill-or-Kill / FOK)`** on multi-LP FX aggregators, baffled when **62% of their `$3,000,000` orders bounce back completely unfilled** while prices run away! Understanding the exact matching-engine state machines behind **`IOC (59=3)`**, **`FOK (59=4)`**, **`GTC / GTD (59=1 / 59=6)`**, and **`Day (59=0)`** eliminates self-inflicted rejection storms.

Connected to our [CLOB vs Disclosed FX Streams & Slippage Guide](/orderbook/clob-vs-disclosed-fx-streams-effective-spread-slippage-guide), paired with [multi-ECN phantom liquidity mirages](/orderbook/phantom-liquidity-and-duplicate-quote-mirage-across-fx-ecns), and indexed inside the [CLOB vs Disclosed Streams & Slippage Audit hub](/topics/lmax-ebs-ecn-spread-slippage-audit), calibrating `Tag 59` per venue maximizes fill certainty without leaking order intent.

## Why `Fill-or-Kill (FOK, 59=4)` Fails Catastrophically on Multi-LP FX Bridges!

Contrast what happens when you send a **`$5,000,000 Buy Limit @ 1.08504`** split across 4 Liquidity Providers (`$1.25M` each) under **`FOK (59=4)`** versus **`IOC (59=3)`**:
1. **The `FOK` All-or-Nothing Trap**: Suppose LPs #1, #2, and #3 stand ready to fill `$3.75M` immediately, *but* LP #4's `$1.25M` quote ticked `0.1 pips` higher (`or rejected on Last-Look`) `2 milliseconds` ago!
 - Under strict atomic **`FOK`**, because `100%` of the `$5.0M` could not be satisfied at `<= 1.08504`, **your entire `$5.0M` order aborts (`$0` filled!)**—worse still, your failed attempt just **revealed `$5.0M` of buy demand** across the bridge!
2. **The Collared `IOC` Advantage (`59=3` + Limit Price Collar)**: Under **`IOC`**, LPs #1, #2, and #3 **immediately lock in `$3.75M` (`75%` filled at your exact price or better!)**, cleanly canceling only the `$1.25M` residual (`OrdStatus=2` or `Canceled` with `CumQty = 3,750,000`) with zero resting book footprint!

![FIX 4.4 Tag 59 TimeInForce decision tree comparing IOC partial-sweep capture, FOK atomic abort penalty, and Post-Only GTC passive spread capture](/api/figure?type=flow&title=FIX%20Tag%2059%20Time-in-Force%20State%20Machine%20Across%20FX%20Venues&subtitle=Matching%20IOC%20%2859%3D3%29%2C%20FOK%20%2859%3D4%29%2C%20and%20Post-Only%20GTC%20%2859%3D1%2C%20Tag%2018%3D6%29%20to%20venue%20mechanics&steps=1.%20Aggressive%20Sweep%3A%3ANeed%20immediate%20fill%20up%20to%20collar%20P_max%20-%3E%20Use%20IOC%20%2859%3D3%2C%20OrdType%3D2%29!%7C2.%20IOC%20Partial%20Lock%3A%3ASweeps%20all%20firm%20rungs%20%3C%3D%20P_max%20%28%243.8M%2F5M%29%3B%20kills%20%241.2M%20tail%20cleanly%7C3.%20Avoid%20FOK%20on%20LL!%3A%3A1%20LP%20Last-Look%20veto%20kills%20100%25%20of%20multi-LP%20FOK%20%26%20leaks%20full%20intent!%7C4.%20Passive%20Maker%20Alpha%3A%3AUse%20GTC%2FGTD%20%2B%20ExecInst%3D6%20%28Participate%20Do%20Not%20Initiate%20%2F%20Post-Only%29!&metrics=IOC%20SWEEP%20CAPTURE%3A%3A88%25%20-%2096%25%20Vol%3A%3ALocks%20Available%20Rungs%20Instantly%7CMULTI-LP%20FOK%20REJECT%3A%3A42%25%20-%2068%25%20Fail!%3A%3ASingle-Leg%20Failure%20Kills%20Parent%7CPOST-ONLY%20FIX%20TAG%3A%3ATag%2018%20%3D%206%3A%3AGuarantees%20Maker%20Fee%20%2F%20Rebate%7CGTD%20NEWS%20AUTO-KILL%3A%3ATag%2059%3D6%20%2B%20126%3A%3AExpires%205s%20Before%2008%3A30%20CPI!)

## Exact Mathematical Probability of `FOK` Failure vs `IOC` Expected Fill

Suppose a parent sweep of size $Q$ requires simultaneous fills across $K$ independent liquidity rungs/LPs, where each LP honors its top quote with probability $(1 - p_i)$. Under **FOK**, a *single* leg miss zeroes out the entire ticket; under **IOC**, expected captured volume remains $(1 - ar{p}) Q$:

```formula
FOK_Full_Ticket_Success_Probability = Product_{i=1..K} ( 1 - p_miss_i ) approx ( 1 - p_miss )^K

IOC_Expected_Captured_Volume_Pct = 1 - p_miss

Expected_Opportunity_Drift_Cost_Difference_bps = ( IOC_Capture_Pct - FOK_Success_Prob ) * Post_Attempt_Price_Drift_bps

Worked $4,000,000 Multi-LP Sweep Audit (Routed Across K = 4 LPs at $1M each; Per-LP Miss/Reject Rate p_miss = 15%; Post-Attempt Drift = 0.85 bps):
1. Fill-or-Kill (Tag 59=4):
 - Success Probability = (0.85)^4 = ONLY 52.20%! (47.80% of tickets return ZERO fill while leaking $4M buy signal!).
 - Expected Opportunity Loss = 0.478 * 0.85 bps = 0.406 bps ($162.50 drag per attempt).
2. Collared Immediate-or-Cancel (Tag 59=3, OrdType=2):
 - Expected Immediate Volume Captured = 85.0% ($3,400,000 locked at arrival price on Pass 1!).
 - Expected Drift on $600k Residual = 0.15 * 0.85 bps = ONLY 0.128 bps ($51.00 -> Cuts miss slippage by 68.6%!).
```

## Complete FIX `Tag 59` Time-in-Force Reference Matrix for Spot FX

Execution engineers integrating [FIX 4.4](/software/fix-api), [MT5](/software/mt5) (`ORDER_FILLING_IOC` vs `ORDER_FILLING_FOK` vs `ORDER_FILLING_RETURN`), and [cTrader](/software/ctrader) across institutional PoPs ([AMB Prime](/dealers/amb-prime), [ALB Prime](/dealers/alb-prime), [Climax Prime](/dealers/climax-prime)) regulated by the [UK FCA](/supervisors/financial-conduct-authority-uk-121) and [CySEC](/supervisors/cysec) map `Tag 59` flags precisely:

| FIX Tag 59 Value | Standard Name | Partial Fills Allowed? | Rests in Order Book? | Optimal FX Microstructure Application |
| :--- | :--- | :--- | :--- | :--- |
| **`59=3` (`IOC`)** | **Immediate-or-Cancel** | **YES** (Kills unfilled balance) | **NO** (`0ms` book exposure) | **#1 Default for Taker Sweeps** (Paired with Limit Collar!) |
| **`59=4` (`FOK`)** | **Fill-or-Kill** | **NO** (`100%` or `0%` atomic) | **NO** | Single-LP atomic hedges where partial lots break regulatory hedge |
| **`59=1` (`GTC`)** | **Good-Till-Cancel** | **YES** (Rests until filled/cxld) | **YES** (Earns FIFO priority) | Passive limit liquidity on [Firm CLOBs](/orderbook/firm-no-last-look-clob-venues-lmax-exchange-execution-mechanics) (Watch news!) |
| **`59=6` (`GTD`)** | **Good-Till-Date (`Tag 126`)** | **YES** | **YES** (Auto-expires @ `ExpireTime`) | **Superior to GTC!** Auto-cancels `10s` before `08:30` CPI/17:00 Roll! |

## Crucial Safety Upgrade: Replace Naked `GTC` With `GTD (Tag 126 ExpireTime)`!

Countless systematic desks have suffered six-figure losses from **"Forgotten Zombie GTC Orders"**: an algorithm posts a passive `GTC Buy Limit` at `1.0810`, drops its FIX TCP socket (or forgets to cancel before `08:30 EST` US CPI), and gets run over by a `-90-pip` macro freight train! Two mandatory FIX safeguards eliminate zombie `GTC` fills forever:
1. **Enable `Cancel-on-Disconnect (CoD)`** on every venue FIX session (`so any TCP heartbeat drop instantaneously purges all resting GTC/GTD orders!`).
2. **Use `GTD (59=6)` with explicit `Tag 126 (ExpireTime)`** set `15 seconds` before the next scheduled Tier-1 macro release or `16:58:00 NY` rollover!

![First-pass realized volume capture percentage on a $4M 4-LP sweep across Collared IOC, Firm-CLOB FOK, Multi-LP Last-Look FOK, and Uncollared Market](/api/figure?type=bars&title=Pass-1%20Execution%20Efficiency%20%28%244M%20Sweep%29%3A%20IOC%20vs%20FOK%20Diagnostics&subtitle=Effective%20volume%20captured%20cleanly%20within%20price%20tolerance%20%28%25%20of%20%244M%20target%29&steps=Collared%20IOC%20%28Firm%29%3A%3A96.5%25%20Captured%20%20%20Sweeps%20firm%20rungs%20%3C%3D%20collar%3B%20zero%20orphan%20rest%7CCollared%20IOC%20%28LL%20Pool%29%3A%3A85.0%25%20Captured%20%20%20Isolates%20single-LP%20reject%3B%20locks%203%2F4%20healthy%20legs!%7CFOK%20on%20Firm%20Single%20Book%3A%3A79.0%25%20Captured%20%20%20Works%20if%20Level-2%20sum%20%3E%3D%20%244M%3B%20binary%20miss%20otherwise%7CFOK%20on%204-LP%20LL%20Bridge%3A%3A44.5%25%20Captured!%20%20%20Any%201%20LP%20hold-reject%20aborts%20all%204%20legs%20%26%20leaks%20flow!&metrics=MT5%20EA%20MISTAKE%3A%3AHardcoded%20FOK!%3A%3ASwitch%20EA%20to%20ORDER_FILLING_IOC!%7CCANCEL-ON-DISCONNECT%3A%3AMandatory%20CoD%3A%3APurges%20Resting%20GTC%20on%20Socket%20Drop%7CPOST-ONLY%20GUARD%3A%3AExecInst%20%3D%206%3A%3ANever%20Accidentally%20Cross%20Spread%7CMINQTY%20HYBRID%3A%3ATag%20110%20MinQty%3A%3AIOC%20With%20Custom%20Floor%20%28e.g.%20%3E%3D%241M%29)

## Pro Tip: Need a Minimum Clip Size Without `100% FOK` Rigidity? Use `FIX Tag 110 (MinQty)`!

What if your prime-brokerage ticket fee makes fills smaller than `$500,000` uneconomical, yet `100% FOK` on a `$5,000,000` order rejects too often? Send **`Tag 59=3 (IOC)` + `Tag 110 (MinQty) = 500000`** on supported institutional CLOBs: you capture any partial fill between `$500k` and `$5.0M`, while skipping tiny `$10k` dust partials!

## Frequently asked questions

### Why does my MT5 Expert Advisor get rejected with "Unsupported filling mode" or high rejects under FOK?

Many ECN and STP liquidity bridges mandate Immediate-or-Cancel (ORDER_FILLING_IOC) because multi-LP liquidity is fragmented across several banks; hardcoding Fill-or-Kill (FOK) forces the bridge to abort whenever a single LP rung moves.

### What is the difference between an IOC Limit order and a regular Limit order?

A regular GTC/Day Limit order rests visibly in the order book if not filled immediately (exposing you to adverse news jumps), whereas an IOC Limit order sweeps everything available at or better than your limit price right now and cancels any leftover quantity in 0ms.

### What is a "Post-Only" (Participate Do Not Initiate, FIX Tag 18=6) limit order?

If a rapid market tick moves the opposing Ask down to your intended passive Buy Limit price while your order is in flight, a normal GTC Limit would accidentally cross the spread as a Taker; Post-Only cancels or slides the order so you ONLY execute passively as a Maker.

### What does Cancel-on-Disconnect (CoD) do on a FIX 4.4 FX trading session?

Cancel-on-Disconnect instructs the ECN or Prime-of-Prime matching engine to automatically cancel every active resting GTC and GTD limit order within milliseconds if your FIX TCP connection drops or misses a heartbeat.


## Source URLs

- https://www.fixtrading.org/standards/fix-4-4/
- https://www.globalfxc.org/docs/fx_global.pdf
- https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX%3A32017R0584

## Citation

- APA: Alistair Kerr, CFA. (2026). FX Time-in-Force Diagnostics: IOC vs FOK vs GTC Execution. FXOpen Ledger. https://fxopenledger.com/orderbook/limit-order-time-in-force-ioc-fok-gtc-execution-diagnostics
- Canonical article: [FX Time-in-Force Diagnostics: IOC vs FOK vs GTC Execution](https://fxopenledger.com/orderbook/limit-order-time-in-force-ioc-fok-gtc-execution-diagnostics)
- Site research index: [FXOpen Ledger](https://fxopenledger.com/llms-full.txt)
