nautechsystems/nautilus_trader · error
unsupported trigger price type for Derive: {other:?}; Derive
Error message
unsupported trigger price type for Derive: {other:?}; Derive trigger orders support only MarkPrice What it means
Derive trigger orders support only the Mark price as trigger source. This is the catch-all arm of `trigger_price_type_to_derive`: any `TriggerType` other than Default/MarkPrice/IndexPrice is rejected with this message naming the offending value.
Source
Thrown at crates/adapters/derive/src/common/parse.rs:172
),
}
}
/// Maps Nautilus trigger price source to Derive.
///
/// # Errors
///
/// Returns an error unless the trigger source maps to mark price, which is the
/// only source Derive currently accepts for trigger orders.
pub fn trigger_price_type_to_derive(
trigger_type: Option<TriggerType>,
) -> anyhow::Result<DeriveTriggerPriceType> {
match trigger_type {
Some(TriggerType::Default | TriggerType::MarkPrice) => Ok(DeriveTriggerPriceType::Mark),
Some(TriggerType::IndexPrice) => anyhow::bail!(
"unsupported trigger price type for Derive: IndexPrice; Derive currently accepts only MarkPrice for trigger orders"
),
Some(other) => anyhow::bail!(
"unsupported trigger price type for Derive: {other:?}; Derive trigger orders support only MarkPrice"
),
None => anyhow::bail!(
"missing trigger price type for Derive trigger order; Derive trigger orders support only MarkPrice"
),
}
}
/// Maps a Nautilus time-in-force flag to the Derive TIF.
///
/// # Errors
///
/// Returns an error for time-in-force flags Derive does not accept.
pub fn time_in_force_to_derive(
tif: TimeInForce,
post_only: bool,
) -> anyhow::Result<DeriveTimeInForce> {
match tif {View on GitHub (pinned to 18893faf8b)
Solutions
- Use `TriggerType::MarkPrice` (or Default) for Derive trigger orders
- Pre-validate with `validate_trigger_order_support` and route orders with other trigger types to a different venue or plain-order logic
- Update the adapter if a new TriggerType variant should map to Mark price
Example fix
// before TriggerType::LastPrice // rejected // after TriggerType::MarkPrice // accepted for Derive triggers
Defensive patterns
Strategy: validation
Validate before calling
fn is_derive_trigger_price(t: TriggerType) -> bool { matches!(t, TriggerType::Default | TriggerType::MarkPrice) } Type guard
fn is_derive_trigger_price(t: TriggerType) -> bool { matches!(t, TriggerType::Default | TriggerType::MarkPrice) } Try / catch
match trigger_price_type_to_derive(order.trigger_type()) {
Ok(_) => { /* proceed */ }
Err(e) => tracing::warn!(%e, "trigger source not mappable to Derive"),
} Prevention
- Constrain trigger sources to MarkPrice for Derive
- Catch new TriggerType variants in adapter updates
- Validate trigger type before payload construction
When it happens
Trigger: Passing an exotic TriggerType variant (e.g. LastPrice, BidAskPrice-type variants) into `trigger_price_type_to_derive` via `DeriveTriggerFields` or `validate_trigger_order_support` when building a Derive trigger order.
Common situations: Strategies using venue-specific trigger sources like last-trade price that have no Derive equivalent; newly added Nautilus TriggerType variants not yet handled by the Derive adapter.
Related errors
- unsupported trigger order type for Derive: {other:?}; suppor
- unsupported trigger price type for Derive: IndexPrice; Deriv
- unsupported order type for Derive: {other:?}
- 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/c68371615a96b961.
Report an issue: GitHub.