nautechsystems/nautilus_trader · error · anyhow::Error

`post_only` not supported by Interactive Brokers

Error message

`post_only` not supported by Interactive Brokers

What it means

Pre-flight denial in handle_submit_order_async: Interactive Brokers has no native post-only order flag, so an order submitted with post_only is denied locally via an OrderDenied event rather than sent to TWS/Gateway.

Source

Thrown at crates/adapters/interactive_brokers/src/execution/core_orders.rs:47

        account_id: AccountId,
        order_submit_lock: &Arc<tokio::sync::Mutex<()>>,
    ) -> anyhow::Result<()> {
        if cmd.order_init.post_only {
            let ts_event = clock.get_time_ns();
            let event = OrderDenied::new(
                cmd.order_init.trader_id,
                cmd.strategy_id,
                cmd.instrument_id,
                cmd.order_init.client_order_id,
                Ustr::from("`post_only` not supported by Interactive Brokers"),
                UUID4::new(),
                ts_event,
                ts_event,
            );
            exec_sender
                .send(ExecutionEvent::Order(OrderEventAny::Denied(event)))
                .map_err(|e| anyhow::anyhow!("Failed to send order denied event: {e}"))?;
            anyhow::bail!("`post_only` not supported by Interactive Brokers");
        }

        let is_inverse = instrument_provider
            .find(&cmd.instrument_id)
            .map(|instrument| instrument.is_inverse())
            .unwrap_or(false);

        if cmd.order_init.quote_quantity && !is_inverse {
            let ts_event = clock.get_time_ns();
            let event = OrderDenied::new(
                cmd.order_init.trader_id,
                cmd.strategy_id,
                cmd.instrument_id,
                cmd.order_init.client_order_id,
                Ustr::from("UNSUPPORTED_QUOTE_QUANTITY"),
                UUID4::new(),
                ts_event,
                ts_event,

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Submit the order without the post_only flag
  2. Emulate post-only behavior in the strategy, e.g. submit as LIMIT and cancel if it would cross
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/adapters/interactive_brokers/src/execution/core_orders.rs:47 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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