# Cancel-On-Disconnect (COD) & Grace Windows: CME vs Nasdaq

> Exchange-native Cancel-On-Disconnect (COD) engineering: TCP RST vs silent black holes, CME iLink 3 5-second grace windows, Eurex T7, and GTC traps.

Canonical: https://terminalledgerdesk.com/reports/cancel-on-disconnect-cod-heartbeat-grace-windows-cme-nasdaq-eurex
Last updated: 2026-11-14T19:41:42.164Z

**Publication:** Terminal Ledger Desk
**Category:** Mifid Rts6 Pretrade Kill Switch Controls
**Published:** 2026-11-13T15:15:25.915Z
**Author:** Marcus Thorne, CQF (Certificate in Quantitative Finance (CQF), Low-Latency FIX & Matching Engine Architect)
**Reviewer:** Not recorded

## Answer-first summary

Cancel-On-Disconnect is the market maker safety net when switches crash or fiber snaps—yet silent black-hole timeouts, 5-second grace windows, and GTD/GTC order exclusions routinely leave "protected" books exposed.

## Key takeaways

- Passive Cancel-On-Disconnect fires quickly (~150 us) only when a live OS kernel sends TCP FIN/RST; silent power or switch black holes wait for full heartbeat expiration.
- CME Globex iLink 3 enforces a 5-second reconnection grace period on involuntary disconnects before COD executes—leaving quotes live for 5,000 ms unless explicitly mass-canceled.
- Sending a polite FIX Logout (35=5) or iLink Terminate during process shutdown is classified as a VOLUNTARY exit and DOES NOT trigger COD!
- Mark algorithmic market-making quotes strictly as Non-Persistent / Day (never GTC unless intended) and pair primary hosts with out-of-band 35=q watchdogs.

## Related financial entities

- **CME Aurora Financial Data Center Standard** (CME-AURORA) — product: Dedicated CME Group hosting facility in Aurora, Illinois, housing the Globex matching engine and offering direct low-latency colocation to clearing members.
- **FIX Protocol Session Layer Specification (FIXT.1.1)** (FIXT-SESSION) — product: Bi-directional, stateful session communication protocol providing guaranteed, ordered message delivery for financial transactions.
- **High-Availability Trading Failover Architecture** (HA-CLUSTER) — product: Clustered server configuration designed to guarantee uninterrupted execution processing even during sudden hardware failure, power loss, or network partitions.

## Analysis

Every electronic market maker assumes that pulling the power cord or killing a trading process triggers exchange-native **Cancel-On-Disconnect (`COD`)** instantaneously. In reality, **how** a connection dies—and **which** order lifetimes (`Day` vs `GTC` vs `Auction-Only`) were flagged at submission—determines whether resting quotes vanish in **150 microseconds** (`TCP FIN/RST`) or sit naked on the order book for **5,000 to 35,000 milliseconds** during a silent routing black hole!

## Explicit TCP `RST/FIN` vs Silent Network Black-Hole Detection Timers

Connecting the session recovery mechanics from our [MiFID II RTS 6 & SEC 15c3-5 Architecture Hub](/reports/mifid-ii-rts-6-sec-rule-15c3-5-pretrade-risk-kill-switch-sla-guide) and [FIX Session Layer Specification](/engines/fix-session-layer-specification), an exchange order-entry gateway detects client loss through two radically different mechanisms:
1. **Clean OS Kernel Tear-Down (`kill -9` or NIC Link-Down on Direct Cross-Connect)**: When a Linux trading process terminates (while the host OS kernel stays alive), the kernel network stack immediately emits a `TCP FIN` or `TCP RST` packet (`~150 us` inside [Aurora DC3](/engines/cme-aurora-colocation-standard) or NY4). The exchange gateway sees `EOF` immediately.
2. **Silent Black Hole (`Kernel Panic`, Power Loss Behind L2/L3 Switch, or WAN Partition)**: No `TCP FIN` or `RST` is ever transmitted! The exchange gateway remains completely blind to the dead client until its **`HeartBtInt` / KeepAlive timer plus Grace Window** expires—commonly **`3,000 ms to 36,000 ms`** depending on venue configuration!

![Timeline comparison of Emergency 35=q Mass Purge (1.2ms) vs TCP RST + CME 5s Grace Window (5,001ms) vs Silent Kernel Panic Heartbeat Timeout + Grace Window (15,000ms)](/api/figure?type=flow&title=Disconnect-to-Flat%20Timeline%3A%20Active%2035%3Dq%20vs%20Passive%20COD&subtitle=Why%20passive%20Cancel-On-Disconnect%20leaves%20market%20makers%20exposed%20for%205%20to%2015%2B%20seconds&steps=t%20%3D%200%20ms%20%20Host%20Fault%3A%3APower%20loss%20or%20kernel%20panic%20in%20rack%7Ct%20%3D%200..10%2C000%20ms%3A%3ASilent%20black%20hole%3A%202x%205s%20missed%20HBs%7Ct%20%3D%2010%2C000..15%2C000%20ms%3A%3ACME%205.0s%20Reconnect%20Grace%20Window%20runs!%7Ct%20%3D%2015%2C002%20ms%20%20COD%3A%3AQuotes%20finally%20purged%20%2815s%20naked!%29&metrics=ACTIVE%2035%3DQ%20PURGE%3A%3A0.8%E2%80%931.5%20ms%3A%3AExplicit%20OrderMassActionReq%7CCME%20GRACE%20WINDOW%3A%3A5%2C000%20ms%3A%3AWaits%20for%20UUID%20reconnect%7CPOLITE%2035%3D5%20LOGOUT%3A%3ANO%20COD!%3A%3AVoluntary%20logout%20skips%20COD!%7CSO_LINGER%3D0%20RST%3A%3A~180%20us%3A%3AForces%20involuntary%20TCP%20drop)

## The Reconnection Grace-Window Trap: CME iLink 3, Nasdaq OUCH & Eurex T7

Even after an exchange detects a broken TCP socket, several major derivatives venues insert a deliberate **Reconnection Grace Period** before purging orders so transient micro-flaps do not wipe queue priority:
- **CME Globex iLink 3 (`Mandatory COD`)**: When an iLink 3 TCP session drops involuntarily, CME starts a **`5-second` (`5,000 ms`) Grace Period**! If the client reconnects and re-establishes the same `UUID` session within `5.0 seconds`, **no orders are canceled**; COD fires *only* after the full `5,000 ms` grace timer expires without reconnect (unless an out-of-band [Auto-Cancel / Mass Action API](/reports/order-mass-action-request-fix-tag-35-q-firm-level-kill-switch-apis) or [Drop-Copy shadow kill switch](/reports/drop-copy-shadow-kill-switch-out-of-band-clearing-broker-disconnect) purges them immediately)!
- **Nasdaq OUCH 5.0 (`AIQ / Port COD`)**: Supports configurable port-level Cancel-On-Disconnect that initiates immediate asynchronous sweeps of open `Day` orders upon SoupBinTCP loss (`1-second` server/client heartbeat timeout).
- **Eurex T7 (`ETI` Binary Sessions)**: distinguishes **High-Frequency (`HF`)** and **Low-Frequency (`LF`)** ETI sessions, deleting non-persistent (`Standard`) orders immediately on session loss while **retaining Persistent orders** unless explicitly configured or mass-deleted!

| Exchange & Protocol | Min Heartbeat / KeepAlive | Reconnect Grace Window | Polite `Logout` Behavior | Default `GTC / Persistent` Handling |
| :--- | :--- | :--- | :--- | :--- |
| **CME Globex (`iLink 3 SBE`)** | `5,000 ms` (`KeepAliveInterval`) | **`5,000 ms` grace wait** | Voluntary `Terminate` **does NOT fire COD** | Resting `GTC/GTD` canceled **only if** `ExecInst` / COD scope configured |
| **Nasdaq (`OUCH 5.0` / `SoupBinTCP`)** | `1,000 ms` client/server HB | `0 ms` (Immediate on EOF) | Unsequenced `Logout` skips involuntary COD | Port-level COD sweeps open continuous `Day` orders |
| **Eurex T7 (`ETI` Binary)** | Configurable ms heartbeat | Immediate on `HF` session loss | Standard `Logout` retains `Persistent` orders | **`Standard` (`Non-Persistent`) purged**; `Persistent` retained! |
| **Broker DMA ([FIX 4.4](/software/fix-api))** | Typically `15s – 30s` (`Tag 108`) | Broker-specific (`0–10s`) | `35=5` leaves all orders working! | Requires explicit per-account COD subscription |

## Venue-by-Venue Cancel-On-Disconnect Behavior & Pitfall Matrix

Comparing involuntary disconnect timers, reconnection grace delays, and dangerous order-type exclusions across leading global exchanges.

```formula
T_worst_silent_cod_ms = (N_missed_heartbeats * T_heartbeat_ms) + T_tcp_retransmit_backoff_ms + T_venue_grace_window_ms

Worked Exposure Window Comparison (CME iLink 3 Market Maker During Top-of-Rack Switch Power Loss):
 Scenario A — Default 30,000 ms KeepAlive + 5,000 ms CME Grace Window:
 T_worst_silent_cod = (1 * 30,000 ms) + 1,000 ms + 5,000 ms = 36,000 ms (36 full seconds of stale quotes!)
 Scenario B — Tuned 5,000 ms Min KeepAlive + Out-of-Band Backup Host Firing 35=q after 250 ms missed UDP ping:
 T_active_watchdog = 250 ms detection + 1.2 ms OrderMassActionRequest (35=q) = 251.2 ms (143x faster!)
```

## Deadly COD Exclusions: Why `GTC`, `GTD`, Cross-Session & Halted Orders Survive!

Post-mortem investigations of multi-million-dollar disconnect losses repeatedly uncover **four categories of resting orders that survive COD untouched**:
1. **`GTC` (`Good-Till-Cancel`, `59=1`) & `GTD` (`Good-Till-Date`, `59=6`) Orders**: On many venues and Eurex `Persistent` order flags, `GTC/GTD` orders are legally classified as multi-session persistent instructions and **exempt from default session COD** unless the firm opts into `Cancel-All-Including-GTC` port attributes!
2. **Graceful `Logout (35=5)` Shutdowns**: On standard FIX and CME iLink 3, COD triggers ONLY on **involuntary** connection loss! If a developer stops a trading container cleanly (`SIGTERM`) and the engine politely sends a FIX `Logout (35=5)` handshake before exiting, **CME does NOT treat that as an involuntary disconnect**—leaving every resting quote live!
3. **Halted / Auction-Locked Instruments**: If a symbol is mid-halt ([CME Velocity Logic](/reports/cme-globex-velocity-logic-dynamic-circuit-breakers-microsecond-halt) or LULD pause) in a `No-Cancel` freeze state when COD fires, the cancel queues or rejects until auction transition.
4. **Orders Entered on Backup Ports (`Session B`)**: COD is scoped strictly to the disconnected `SessionID` (unless Group/Firm-level COD is enabled).

![Total worst-case quote exposure window in milliseconds across four disconnect scenarios: Out-of-Band 35=q Watchdog, SoupBinTCP RST, CME iLink 3 TCP RST, and Silent WAN Black Hole](/api/figure?type=bars&title=Quote%20Exposure%20Duration%20by%20Disconnect%20Mode%20%28Milliseconds%29&subtitle=Time%20elapsed%20from%20trading%20engine%20failure%20until%20100%25%20of%20resting%20quotes%20leave%20the%20CLOB&steps=Out-of-Band%20Watchdog%20%2B%2035%3Dq%20Purge%3A%3A25%20ms%20total%20%2824ms%20HB%20%2B%201ms%20purge%29%7CNasdaq%20OUCH%20Immediate%20TCP%20RST%3A%3A1.4%20ms%20total%20%28No%20reconnect%20grace%29%7CCME%20iLink%203%20TCP%20RST%20%28w%2F%205s%20Grace%29%3A%3A5%2C001%20ms%20total%20%28Mandatory%205s%20wait!%29%7CSilent%20Power%20Cut%20%2830s%20FIX%20HeartBt%29%3A%3A35%2C000%20ms%2B%20%28Catastrophic%20inventory!%29&metrics=ORDER%20TAGGING%3A%3ANon-Persist%3A%3AAvoid%20unintended%20GTC%2FPersist%7CMIN%20CME%20KEEPALIVE%3A%3A5%2C000%20ms%3A%3AiLink%203%20KeepAliveInterval%20floor%7COUCH%20HEARTBEAT%3A%3A1%2C000%20ms%3A%3ASoupBinTCP%201s%20timeout%20cadence%7CDROP-COPY%20AUDIT%3A%3AVerify%2039%3D4%3A%3AConfirm%20COD%20ExecutionReports)

## Hardening Disconnect Architecture: Aggressive Heartbeats + Dual-Path Kill Switches

Never rely on passive socket loss alone as your primary emergency brake! Institutional [HA Trading Failover Architectures](/engines/ha-trading-failover-architecture) enforce three rules:
- Negotiate the **shortest venue-permitted `KeepAliveInterval`** (`1,000 ms` on SoupBinTCP; `5,000 ms` minimum on CME iLink 3).
- In emergency shutdown hooks (`SIGINT / SIGTERM / Panic`), **explicitly broadcast `OrderMassActionRequest (35=q)` FIRST**, wait `50 ms` for `35=r` ACK, and if unacknowledged, tear down via raw `SO_LINGER {l_onoff=1, l_linger=0}` (`TCP RST`) rather than polite `35=5 Logout`!
- Pair every trading host with an independent out-of-band watchdog ([Drop-Copy shadow kill switch](/reports/drop-copy-shadow-kill-switch-out-of-band-clearing-broker-disconnect)) and size unhedged 5-second drift exposure in our [Terminal Margin VaR & ES Calculator](/calculators/terminal-margin-var-es-calculator).

## Frequently asked questions

### Why did our graceful Docker container restart leave 400 resting futures orders working on CME Globex?

Docker stop sends SIGTERM, triggering your FIX/iLink library clean shutdown hook which transmitted a polite Logout / Terminate handshake! Exchanges only trigger Cancel-On-Disconnect on INVOLUNTARY drops. Always send OrderMassActionRequest (35=q) and verify 35=r acknowledgment BEFORE closing sessions!

### How can a C++ shutdown handler force an immediate involuntary TCP RST instead of a clean FIN/Logout?

If an emergency kill-switch path fails to receive a 35=r Mass Action ACK within 50ms, configure setsockopt(fd, SOL_SOCKET, SO_LINGER, &linger{1, 0}, sizeof(linger)) and call close(fd): the Linux kernel immediately blasts a raw TCP RST without any FIX Logout frame.

### Why does CME Globex wait 5 seconds before executing Cancel-On-Disconnect?

Institutional futures desks holding deep FIFO queue priority in Eurodollar/SOFR or Treasury books demanded protection against sub-second network micro-flaps; if the engine reconnects the same UUID within 5 seconds, queue priority is preserved—which is why latency market makers supplement COD with explicit CME Mass Action / Auto-Cancel APIs.

### How do we verify after a disconnect that 100% of resting orders were actually canceled?

Subscribe an independent, geographically or network-diverse Drop-Copy / Execution session (which stays connected when the order-entry port dies) to collect every unsolicited ExecutionReport (39=4 Canceled, ExecRestatementReason / Text = COD) and alert humans immediately if Open_Order_Count != 0.


## Source URLs

- https://www.cmegroup.com/confluence/display/EPICSANDBOX/Cancel+on+Disconnect
- https://www.nasdaqtrader.com/content/technicalsupport/specifications/TradingProducts/OUCH5.0.pdf
- https://www.eurex.com/ex-en/support/initiatives/t7-release-documentation

## Citation

- APA: Marcus Thorne, CQF. (2026). Exchange Cancel-On-Disconnect (COD): Heartbeat Grace Windows Across CME, Nasdaq & Eurex. Terminal Ledger Desk. https://terminalledgerdesk.com/reports/cancel-on-disconnect-cod-heartbeat-grace-windows-cme-nasdaq-eurex
- Canonical article: [Exchange Cancel-On-Disconnect (COD): Heartbeat Grace Windows Across CME, Nasdaq & Eurex](https://terminalledgerdesk.com/reports/cancel-on-disconnect-cod-heartbeat-grace-windows-cme-nasdaq-eurex)
- Site research index: [Terminal Ledger Desk](https://terminalledgerdesk.com/llms-full.txt)
