nautechsystems/nautilus_trader · error · anyhow::Error
Unsupported trigger type for Kraken Spot WS: {other:?} (only
Error message
Unsupported trigger type for Kraken Spot WS: {other:?} (only LastPrice and IndexPrice supported) What it means
For conditional orders, build_add_order_params maps Nautilus TriggerType to Kraken's trigger reference: IndexPrice -> 'index', LastPrice/Default/None -> 'last'. Any other TriggerType variant (e.g. MarkPrice, BidPrice, AskPrice) has no Kraken WS equivalent and bails with this message.
Source
Thrown at crates/adapters/kraken/src/common/order_params.rs:113
(Some(KrakenTimeInForce::GoodTilDate), Some(ts)) => Some(format_expire_time(ts)),
_ => None,
};
let is_conditional = matches!(
order_type,
OrderType::StopMarket
| OrderType::StopLimit
| OrderType::MarketIfTouched
| OrderType::LimitIfTouched
);
let limit_price = order.price().map(|p| p.as_decimal());
let trigger = if is_conditional {
let trigger_ref = match order.trigger_type() {
Some(TriggerType::IndexPrice) => KrakenSpotTrigger::Index,
Some(TriggerType::LastPrice | TriggerType::Default) | None => KrakenSpotTrigger::Last,
Some(other) => anyhow::bail!(
"Unsupported trigger type for Kraken Spot WS: {other:?} (only LastPrice and IndexPrice supported)",
),
};
order.trigger_price().map(|tp| KrakenWsTriggerParams {
reference: trigger_ref,
price: tp.as_decimal(),
price_type: None,
})
} else {
None
};
if is_conditional && trigger.is_none() {
anyhow::bail!("trigger_price is required for conditional order type {order_type:?}");
}
let symbol = cmd.instrument_id.symbol.inner().to_string();
let cl_ord_id = Some(truncate_cl_ord_id(&order.client_order_id()));View on GitHub (pinned to 18893faf8b)
Solutions
- Set the order's trigger_type to LastPrice, IndexPrice, or Default so it maps to a Kraken WS trigger reference.
- If mark/bid/ask-price triggers are essential, execute the order via the Kraken REST path or a different venue.
- Audit order-construction code that hardcodes TriggerType variants copied from other adapters.
Example fix
// before .trigger_type(TriggerType::MarkPrice) // after .trigger_type(TriggerType::LastPrice) // or TriggerType::IndexPrice for Kraken Spot WS
Defensive patterns
Strategy: validation
Validate before calling
if let Some(t) = order.trigger_type() {
if !matches!(t, TriggerType::LastPrice | TriggerType::IndexPrice | TriggerType::Default) {
// reject or remap before Kraken WS submission
}
} Prevention
- Use LastPrice/IndexPrice trigger types for conditional orders on Kraken Spot.
- Avoid copying trigger_type settings from derivatives venues (MarkPrice etc.).
- Centralize trigger-type selection in venue-aware order factory configuration.
When it happens
Trigger: Submitting a conditional order (StopMarket/StopLimit/MarketIfTouched/LimitIfTouched) via Kraken WS with trigger_type set to an unsupported variant such as MarkPrice, BidPrice, or AskPrice.
Common situations: Strategies that explicitly configure mark-price triggers (common on derivatives venues) run against Kraken Spot, whose WS API only supports last- and index-price triggers.
Related errors
- Unsupported time in force: {time_in_force:?}
- Trailing stop orders are not yet supported on the Kraken WS
- Iceberg (display_qty) orders are not supported on the Kraken
- Unsupported order type for Kraken WS: {order_type:?}
- limit_price is required for order type {order_type:?}
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/8c0892527e7cd315.
Report an issue: GitHub.