nautechsystems/nautilus_trader · error
unsupported order type for Derive: {other:?}
Error message
unsupported order type for Derive: {other:?} What it means
Derive (Deribit's L2 DEX) only accepts Limit and Market order types. `order_type_to_derive` converts a Nautilus `OrderType` to Derive's `DeriveOrderType` and rejects any other type (StopMarket, StopLimit, LimitIfTouched, etc.) since plain Derive orders cannot express them.
Source
Thrown at crates/adapters/derive/src/common/parse.rs:124
/// Maps a Nautilus order side to the Derive direction string.
pub fn order_side_to_derive(side: OrderSide) -> DeriveOrderSide {
match side {
OrderSide::Buy => DeriveOrderSide::Buy,
OrderSide::Sell => DeriveOrderSide::Sell,
}
}
/// Maps a Nautilus order type to the Derive order type string.
///
/// # Errors
///
/// Returns an error for order types Derive does not accept.
pub fn order_type_to_derive(order_type: OrderType) -> anyhow::Result<DeriveOrderType> {
match order_type {
OrderType::Limit => Ok(DeriveOrderType::Limit),
OrderType::Market => Ok(DeriveOrderType::Market),
other => anyhow::bail!("unsupported order type for Derive: {other:?}"),
}
}
/// Maps a supported Nautilus trigger order type to the child Derive order type.
///
/// # Errors
///
/// Returns an error for order types not supported by Derive trigger orders.
pub fn trigger_order_type_to_derive(order_type: OrderType) -> anyhow::Result<DeriveOrderType> {
match order_type {
OrderType::StopMarket | OrderType::MarketIfTouched => Ok(DeriveOrderType::Market),
OrderType::StopLimit | OrderType::LimitIfTouched => Ok(DeriveOrderType::Limit),
other => anyhow::bail!(
"unsupported trigger order type for Derive: {other:?}; supported types are StopMarket, StopLimit, MarketIfTouched, and LimitIfTouched"
),
}
}
View on GitHub (pinned to 18893faf8b)
Solutions
- Only submit Limit or Market orders to Derive; convert conditional orders to the adapter's dedicated trigger-order payload path (see `trigger_order_type_to_derive`)
- Add a pre-trade check that rejects or re-routes unsupported order types before the request reaches the venue
- Move conditional logic to the strategy layer (monitor prices and emit plain Market/Limit orders) if triggers aren't suitable
Example fix
// before let payload = order_to_derive_payload(&StopMarketOrder(...))?; // errors // after let payload = trigger_order_to_derive_payload(&StopMarketOrder(...))?; // use trigger path
Defensive patterns
Strategy: validation
Validate before calling
fn is_plain_derive_order(t: OrderType) -> bool { matches!(t, OrderType::Limit | OrderType::Market) } Type guard
fn is_plain_derive_order(t: OrderType) -> bool { matches!(t, OrderType::Limit | OrderType::Market) } Try / catch
match order_type_to_derive(order.order_type()) {
Ok(t) => { /* build payload */ }
Err(e) => tracing::warn!(%e, "rerouting unsupported order type away from Derive"),
} Prevention
- Call validate_order_support before submission in multi-venue routers
- Route conditional/trigger orders through the dedicated Derive trigger payload path
- Implement exotic conditional logic at the strategy layer with plain orders
When it happens
Trigger: Submitting (via `order_to_derive_payload`), amending (via `order_replace_to_derive_payload`), or pre-validating (via `validate_order_support`) a Nautilus order whose OrderType is anything other than Limit or Market — e.g. submitting a StopMarket or trailing order routed to the Derive venue.
Common situations: Multi-venue strategies reusing order construction code across adapters; users configuring stop-loss or conditional orders without realizing Derive only accepts trigger (stop) orders through the dedicated trigger payload path, not as plain order types.
Related errors
- unsupported trigger order type for Derive: {other:?}; suppor
- unsupported trigger price type for Derive: IndexPrice; Deriv
- unsupported trigger price type for Derive: {other:?}; Derive
- missing trigger price type for Derive trigger order; Derive
- post-only Derive orders only support GTC time in force; rece
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/3b736722bc6436bc.
Report an issue: GitHub.