nautechsystems/nautilus_trader · error

Unsupported order type

Error message

Unsupported order type: {:?}, the Architect AX adapter accepts Nautilus MARKET and LIMIT orders

What it means

`validate_order_for_ax_submit` pre-screens every order before submission: the Architect AX adapter only accepts MARKET and LIMIT order types (with GTC/IOC/DAY time in force and whole-contract quantities). Anything else is rejected locally with a clear message instead of an opaque venue error.

Solutions

  1. Convert the strategy to use MARKET or LIMIT orders only, managing stops client-side
  2. Implement the conditional logic (e.g. stop triggers) in the strategy or an execution emulator rather than the venue order
  3. Check time in force is GTC, IOC, or DAY; replace GTD/FOK accordingly
  4. If venue support exists upstream, extend validate_order_for_ax_submit and the AX order payload mapping

Example fix

// before
let order = order_factory.stop_market(...);  // rejected by AX
// after
let order = order_factory.limit(...);  // manage trigger in strategy
Defensive patterns

Strategy: validation

Validate before calling

fn ax_submittable(order: &OrderAny) -> bool {
    matches!(order.order_type(), OrderType::Market | OrderType::Limit)
        && matches!(order.time_in_force(), TimeInForce::Gtc | TimeInForce::Ioc | TimeInForce::Day)
        && order.quantity().as_f64() >= 1.0
}

Try / catch

match validate_order_for_ax_submit(&order) {
    Ok(()) => exec_client.submit_order(order).await?,
    Err(e) => log::warn!("order not AX-compatible, handling locally: {e}"),
}

Prevention

When it happens

Trigger: submit_order on the AX execution client with order types like STOP_MARKET, STOP_LIMIT, LIMIT_IF_TOUCHED, TRAILING_STOP_MARKET, or unsupported time-in-force (GTD, FOK).

Common situations: Strategies using stop-loss/bracket orders unchanged from other venues; backtested configs ported to AX live; users expecting the adapter to emulate unsupported types.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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

Appendix: source

Thrown at crates/adapters/architect_ax/src/execution.rs:1951

        instrument_id,
        venue_order_id,
        TradeId::new(&execution.tid),
        order_side,
        last_qty,
        last_px,
        commission,
        liquidity_side,
        client_order_id,
        None,
        ts_event,
        ts_init,
        Some(UUID4::new()),
    ))
}

fn validate_order_for_ax_submit(order: &OrderAny) -> anyhow::Result<()> {
    if !matches!(order.order_type(), OrderType::Market | OrderType::Limit) {
        anyhow::bail!(
            "Unsupported order type: {:?}, the Architect AX adapter accepts Nautilus MARKET and LIMIT orders",
            order.order_type(),
        );
    }

    // AX accepts only GTC, IOC, and DAY; deny others locally to avoid an opaque venue error
    if !matches!(
        order.time_in_force(),
        TimeInForce::Gtc | TimeInForce::Ioc | TimeInForce::Day
    ) {
        anyhow::bail!(
            "Unsupported time in force: {:?}, AX supports GTC, IOC, and DAY",
            order.time_in_force(),
        );
    }

    validate_order_instructions(
        order.is_reduce_only(),

View on GitHub (pinned to 18893faf8b)