nautechsystems/nautilus_trader · error

GTD not supported by Kraken Futures, use GTC instead

Error message

GTD not supported by Kraken Futures, use GTC instead

What it means

Order-building guard in build_send_order_params: a GTD limit order was submitted, but Kraken Futures encodes time in force inside the orderType field and offers no GTD variant (only lmt/ioc/post/mkt), so the order is rejected and GTC should be used instead.

Source

Thrown at crates/adapters/kraken/src/http/futures/client.rs:1954

        // Map order type and time-in-force to Kraken order type
        // Kraken Futures encodes TIF in the orderType field:
        // - lmt = limit (GTC)
        // - ioc = immediate-or-cancel
        // - post = post-only (maker only)
        // - mkt = market
        let kraken_order_type = match order_type {
            OrderType::Market => KrakenFuturesOrderType::Market,
            OrderType::Limit => {
                if post_only {
                    KrakenFuturesOrderType::Post
                } else {
                    match time_in_force {
                        TimeInForce::Ioc => KrakenFuturesOrderType::Ioc,
                        TimeInForce::Fok => {
                            anyhow::bail!("FOK not supported by Kraken Futures, use IOC instead")
                        }
                        TimeInForce::Gtd => {
                            anyhow::bail!("GTD not supported by Kraken Futures, use GTC instead")
                        }
                        _ => KrakenFuturesOrderType::Limit, // GTC is default
                    }
                }
            }
            OrderType::StopMarket | OrderType::StopLimit => KrakenFuturesOrderType::Stop,
            OrderType::MarketIfTouched | OrderType::LimitIfTouched => {
                KrakenFuturesOrderType::TakeProfit
            }
            _ => anyhow::bail!("Unsupported order type: {order_type:?}"),
        };

        let kraken_side = KrakenOrderSide::from(order_side);

        let mut builder = KrakenFuturesSendOrderParamsBuilder::default();
        builder
            .cli_ord_id(truncate_cl_ord_id(&client_order_id))
            .broker(NAUTILUS_KRAKEN_BROKER_ID)

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Change time_in_force to Gtc.
  2. Cancel stale orders client-side on a timer to emulate GTD.
  3. Filter/translate GTD orders per venue before submission.

Example fix

// before
builder.time_in_force(TimeInForce::Gtd).expire_time(ts)
// after
builder.time_in_force(TimeInForce::Gtc)
Defensive patterns

Strategy: validation

Validate before calling

fn tif_futures_supported(tif: TimeInForce) -> bool {
    !matches!(tif, TimeInForce::Fok | TimeInForce::Gtd)
}

Prevention

When it happens

Trigger: Submitting a Limit order via submit_order/send_order_batches with time_in_force = Gtd (typically with an expire_time set) on Kraken Futures.

Common situations: Strategies that schedule expiring orders per session end; configs shared across venues where GTD is valid elsewhere; adapters migrated from Kraken Spot (which supports GTD) to Futures.

Related errors


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