nautechsystems/nautilus_trader · error
unsupported trigger price type for Derive: IndexPrice; Deriv
Error message
unsupported trigger price type for Derive: IndexPrice; Derive currently accepts only MarkPrice for trigger orders
What it means
Derive trigger orders can only reference the Mark price as the trigger source. `trigger_price_type_to_derive` accepts `TriggerType::Default` or `TriggerType::MarkPrice` (both mapped to Derive's Mark) and explicitly rejects `TriggerType::IndexPrice` with this dedicated message, because the venue has no equivalent.
Source
Thrown at crates/adapters/derive/src/common/parse.rs:169
OrderType::MarketIfTouched | OrderType::LimitIfTouched => Ok(DeriveTriggerType::Takeprofit),
other => anyhow::bail!(
"unsupported trigger order type for Derive: {other:?}; supported types are StopMarket, StopLimit, MarketIfTouched, and LimitIfTouched"
),
}
}
/// 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,View on GitHub (pinned to 18893faf8b)
Solutions
- Change the order's trigger type to `TriggerType::MarkPrice` (or leave Default, which maps to Mark)
- Add `validate_trigger_order_support` to pre-submission checks so the mismatch is caught before the venue call
- Rework the strategy trigger condition to evaluate index-price logic locally and send plain orders when the condition hits
Example fix
// before TriggerType::IndexPrice // rejected by Derive // after TriggerType::MarkPrice // accepted, maps to DeriveTriggerPriceType::Mark
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(pt) => { /* build payload */ }
Err(e) => tracing::warn!(%e, "trigger price source unsupported on Derive"),
} Prevention
- Default Derive trigger orders to TriggerType::MarkPrice
- Pre-validate trigger type with validate_trigger_order_support
- Keep IndexPrice-triggered logic in the strategy layer
When it happens
Trigger: Submitting a Derive trigger order whose Nautilus order specifies `trigger_type = TriggerType::IndexPrice` — e.g. a stop that the strategy configured to fire on the index price rather than the mark price.
Common situations: Strategies written for venues that support index-price triggers being reused against Derive; config files copied from another venue adapter that set IndexPrice as the trigger source.
Related errors
- unsupported trigger order type for Derive: {other:?}; suppor
- unsupported trigger price type for Derive: {other:?}; Derive
- 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/1abe3532c542da6a.
Report an issue: GitHub.