nautechsystems/nautilus_trader · error
Iceberg (display_qty) orders are not supported on the Kraken
Error message
Iceberg (display_qty) orders are not supported on the Kraken WS batch path; use REST
What it means
Iceberg orders (with a visible `display_qty`) are not supported on Kraken's WebSocket batch-order path, so `build_batch_order` rejects any order whose display_qty is set and directs the caller to REST.
Source
Thrown at crates/adapters/kraken/src/execution/spot.rs:1006
leverage: Option<u16>,
) -> anyhow::Result<KrakenWsBatchAddOrder> {
let order_type = order.order_type();
let side = match order.order_side() {
OrderSide::Buy => KrakenOrderSide::Buy,
OrderSide::Sell => KrakenOrderSide::Sell,
};
if matches!(
order_type,
OrderType::TrailingStopMarket | OrderType::TrailingStopLimit
) {
anyhow::bail!(
"Trailing stop orders are not yet supported on the Kraken WS batch path; use REST",
);
}
if order.display_qty().is_some() {
anyhow::bail!(
"Iceberg (display_qty) orders are not supported on the Kraken WS batch path; use REST",
);
}
let kraken_order_type = match order_type {
OrderType::Market => KrakenOrderType::Market,
OrderType::Limit => KrakenOrderType::Limit,
OrderType::StopMarket => KrakenOrderType::StopLoss,
OrderType::StopLimit => KrakenOrderType::StopLossLimit,
OrderType::MarketIfTouched => KrakenOrderType::TakeProfit,
OrderType::LimitIfTouched => KrakenOrderType::TakeProfitLimit,
ty => anyhow::bail!("Unsupported order type for Kraken WS batch: {ty:?}"),
};
let is_limit_order = matches!(
order_type,
OrderType::Limit | OrderType::StopLimit | OrderType::LimitIfTouched
);View on GitHub (pinned to 18893faf8b)
Solutions
- Submit iceberg orders via REST instead of the WS batch path
- Remove display_qty (submit the full quantity) if iceberg behavior is not required
- Exclude the iceberg order from the batch and send it individually over REST
Example fix
// before let order = factory.iceberg_limit(...display_qty...); batch_add_via_ws(vec![order]); // after client.submit_order_via_rest(order); // icebergs must go over REST
Defensive patterns
Strategy: validation
Validate before calling
if order.display_qty().is_some() {
submit_via_rest(order); // icebergs unsupported on WS batch
} else {
batch_add_via_ws(vec![order])?;
} Type guard
fn is_non_iceberg(order: &OrderAny) -> bool { order.display_qty().is_none() } Try / catch
match batch_result {
Err(e) if e.to_string().contains("Iceberg") => submit_via_rest(order),
r => r?,
} Prevention
- Check display_qty before adding an order to a WS batch
- Submit icebergs over REST only
- Clear display_qty accidentally set by order templates when iceberg behavior is not intended
When it happens
Trigger: Calling `batch_add_via_ws` with an order that has `display_qty` populated (OrderFactory-created iceberg orders).
Common situations: Executing large parent orders as icebergs while the execution setup routes adds through the WS batch API; accidentally leaving display_qty set on an order template.
Related errors
- Trailing stop orders are not yet supported on the Kraken WS
- Unsupported order type for Kraken WS batch: {ty:?}
- {FAILED}: {e}
- {FAILED}: {e}
- {FAILED}: {e}
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/6686d03afd9652e0.
Report an issue: GitHub.