nautechsystems/nautilus_trader · error · anyhow::Error

Iceberg (display_qty) orders are not supported on the Kraken

Error message

Iceberg (display_qty) orders are not supported on the Kraken WS path; use REST

What it means

Kraken WS addOrder params cannot represent iceberg orders: Nautilus orders carrying a display_qty cannot be translated, so build_add_order_params bails and points users to Kraken REST, which supports the display volume parameter.

Source

Thrown at crates/adapters/kraken/src/common/order_params.rs:69

) -> anyhow::Result<KrakenWsAddOrderParams> {
    let order_type = order.order_type();
    let order_side = order.order_side();
    let time_in_force = order.time_in_force();

    let side = match 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 path; use REST",);
    }

    if order.display_qty().is_some() {
        anyhow::bail!(
            "Iceberg (display_qty) orders are not supported on the Kraken WS 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,
        _ => anyhow::bail!("Unsupported order type for Kraken WS: {order_type:?}"),
    };

    let is_limit_order = matches!(
        order_type,
        OrderType::Limit | OrderType::StopLimit | OrderType::LimitIfTouched
    );

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Remove display_qty from orders sent to Kraken, or submit iceberg orders via the Kraken REST client.
  2. Submit the order as a plain Limit/Market order without display quantity if full visibility is acceptable.
  3. Implement client-side slicing: emit multiple full-size child orders emulating the display quantity.

Example fix

// before
order_factory.limit(instrument_id, side, qty, price, time_in_force, Some(display_qty))
// after
order_factory.limit(instrument_id, side, qty, price, time_in_force, None) // no iceberg on Kraken WS
Defensive patterns

Strategy: validation

Validate before calling

if order.display_qty().is_some() {
    // submit via REST or strip display_qty before WS submission
}

Try / catch

if let Err(e) = ws_client.submit(order).await {
    if e.to_string().contains("Iceberg") {
        rest_client.submit(order).await?; // REST supports display volume
    } else { return Err(e); }
}

Prevention

When it happens

Trigger: Submitting any order via the Kraken WebSocket execution client whose order has a display_qty (iceberg) set, e.g. a Limit order with display_qty configured in the order factory or strategy.

Common situations: Strategies tuned for venues that support icebergs (large-order slicing) run unchanged against Kraken WS; the display_qty field survives from the backtest/simulation config into live submission.

Related errors


AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08). Data as JSON: /api/errors/78cf676e520387a6. Report an issue: GitHub.