nautechsystems/nautilus_trader · error
Trigger/conditional orders ({order_type:?}) are not supporte
Error message
Trigger/conditional orders ({order_type:?}) are not supported for OKX options What it means
Conditional/trigger (algo) orders are not supported for OKX options in this adapter. When the order type is conditional and the instrument resolves to `OKXInstrumentType::Option`, `submit_order_route` bails rather than routing to the algo HTTP endpoint. The adapter only routes conditional orders via `OrderCommandRoute::AlgoHttp` for non-option, non-spread instruments.
Source
Thrown at crates/adapters/okx/src/execution.rs:651
fn is_conditional_order(&self, order_type: OrderType) -> bool {
OKX_CONDITIONAL_ORDER_TYPES.contains(&order_type)
}
fn submit_order_route(
&self,
instrument_id: InstrumentId,
order_type: OrderType,
) -> anyhow::Result<OrderCommandRoute> {
if self.is_conditional_order(order_type) {
if is_spread_instrument(instrument_id) {
anyhow::bail!(
"Trigger/conditional orders ({order_type:?}) are not supported for OKX spreads"
);
}
let inst_type = okx_instrument_type_from_symbol(instrument_id.symbol.as_str());
if inst_type == OKXInstrumentType::Option {
anyhow::bail!(
"Trigger/conditional orders ({order_type:?}) are not supported for OKX options"
);
}
return Ok(OrderCommandRoute::AlgoHttp);
}
if is_spread_instrument(instrument_id) {
Ok(OrderCommandRoute::SpreadHttp)
} else {
Ok(OrderCommandRoute::RegularWs)
}
}
fn cancel_order_route(
&self,
instrument_id: InstrumentId,
order_state: Option<(OrderType, Option<bool>)>,View on GitHub (pinned to 18893faf8b)
Solutions
- Submit plain LIMIT/MARKET options orders and manage stop logic in the strategy itself.
- Hedge or protect the options position at the underlying (e.g. perp/futures) level with supported conditional orders.
- Check `okx_instrument_type_from_symbol` on your symbol to confirm you are not accidentally targeting an option.
Defensive patterns
Strategy: validation
Validate before calling
if is_conditional_order(order_type)
&& okx_instrument_type_from_symbol(instrument_id.symbol.as_str()) == OKXInstrumentType::Option {
return Err(anyhow::anyhow!("Conditional orders unsupported for OKX options"));
}
client.submit_order(order)?; Prevention
- Gate conditional-order submission on instrument type for OKX.
- Manage option stop-loss at the underlying level where algo orders are supported.
- Verify symbol -> instrument type mapping in tests before live deployment.
When it happens
Trigger: Calling `submit_order` with a conditional order type (`is_conditional_order` true, e.g. `StopMarket`, `LimitIfTouched`) where `okx_instrument_type_from_symbol(instrument_id.symbol)` is `OKXInstrumentType::Option`.
Common situations: Adding stop-loss protection to an options position on OKX; reusing an options strategy config that worked on another venue which supports options trigger orders.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Trigger/conditional orders ({order_type:?}) are not supporte
- option_summary_family_subs mutex poisoned
- OKX only supports L2_MBP order book deltas
- Unsupported trailing_offset_type for OKX: {offset_type:?}
- No usable instruments for {instrument_type:?} family {family
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/b526332807d61e53.
Report an issue: GitHub.