Cancel on Disconnect (CoD)
Cancel on Disconnect (CoD) is a risk management feature in trading systems that automatically cancels open orders when a trading session unexpectedly terminates. This critical safety mechanism helps prevent unwanted market exposure during connectivity disruptions.
Understanding Cancel on Disconnect
Cancel on Disconnect is a vital risk management feature that protects trading firms from unintended market exposure when network connectivity is lost. When a trading session terminates unexpectedly, CoD automatically triggers the cancellation of all open orders associated with that session.
How CoD works
The CoD mechanism monitors the health of trading sessions through various methods:
- Heartbeat monitoring
- TCP connection state
- Application-level session monitoring
When a disconnect is detected, the exchange's systems automatically:
- Identify all open orders from the disconnected session
- Generate cancel requests for those orders
- Process the cancellations with high priority
Business importance
CoD is particularly critical for:
- Market makers who maintain numerous open orders
- Algorithmic trading systems running automated strategies
- High-frequency trading operations sensitive to latency
Implementation considerations
Trading venues must carefully design CoD mechanisms to handle:
- False positives (triggering on temporary network blips)
- Latency in disconnect detection
- Order prioritization during mass cancellations
- Recovery and reconnection scenarios
Next generation time-series database
QuestDB is an open-source time-series database optimized for market and heavy industry data. Built from scratch in Java and C++, it offers high-throughput ingestion and fast SQL queries with time-series extensions.
Performance implications
CoD systems must process cancellations with minimal impact on market performance:
- Mass cancel operations must be efficient
- Cancel processing should not disrupt normal order flow
- System capacity must handle spike in cancel messages
- Recovery procedures should manage order state consistently
Market standards
Different trading venues implement CoD with varying features:
- Optional vs. mandatory implementation
- Configurable disconnect detection parameters
- Selective order cancellation options
- Recovery and reconnection protocols
Best practices
Trading firms should:
- Regularly test CoD functionality
- Monitor CoD trigger events
- Maintain backup connectivity
- Document CoD policies and procedures
- Coordinate CoD settings across multiple venues
Understanding and properly implementing Cancel on Disconnect is essential for maintaining market stability and protecting trading operations from technical disruptions.