{"record":{"id":"49b295b325e7cc42","repo":"nautechsystems/nautilus_trader","slug":"unsupported-order-type-the-architect-ax-ada","errorCode":null,"errorMessage":"Unsupported order type: {:?}, the Architect AX adapter accepts Nautilus MARKET and LIMIT orders","messagePattern":"Unsupported order type: (.+?), the Architect AX adapter accepts Nautilus MARKET and LIMIT orders","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/architect_ax/src/execution.rs","lineNumber":1951,"sourceCode":"        instrument_id,\n        venue_order_id,\n        TradeId::new(&execution.tid),\n        order_side,\n        last_qty,\n        last_px,\n        commission,\n        liquidity_side,\n        client_order_id,\n        None,\n        ts_event,\n        ts_init,\n        Some(UUID4::new()),\n    ))\n}\n\nfn validate_order_for_ax_submit(order: &OrderAny) -> anyhow::Result<()> {\n    if !matches!(order.order_type(), OrderType::Market | OrderType::Limit) {\n        anyhow::bail!(\n            \"Unsupported order type: {:?}, the Architect AX adapter accepts Nautilus MARKET and LIMIT orders\",\n            order.order_type(),\n        );\n    }\n\n    // AX accepts only GTC, IOC, and DAY; deny others locally to avoid an opaque venue error\n    if !matches!(\n        order.time_in_force(),\n        TimeInForce::Gtc | TimeInForce::Ioc | TimeInForce::Day\n    ) {\n        anyhow::bail!(\n            \"Unsupported time in force: {:?}, AX supports GTC, IOC, and DAY\",\n            order.time_in_force(),\n        );\n    }\n\n    validate_order_instructions(\n        order.is_reduce_only(),","sourceCodeStart":1933,"sourceCodeEnd":1969,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/architect_ax/src/execution.rs#L1933-L1969","documentation":"`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.","triggerScenarios":"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).","commonSituations":"Strategies using stop-loss/bracket orders unchanged from other venues; backtested configs ported to AX live; users expecting the adapter to emulate unsupported types.","solutions":["Convert the strategy to use MARKET or LIMIT orders only, managing stops client-side","Implement the conditional logic (e.g. stop triggers) in the strategy or an execution emulator rather than the venue order","Check time in force is GTC, IOC, or DAY; replace GTD/FOK accordingly","If venue support exists upstream, extend validate_order_for_ax_submit and the AX order payload mapping"],"exampleFix":"// before\nlet order = order_factory.stop_market(...);  // rejected by AX\n// after\nlet order = order_factory.limit(...);  // manage trigger in strategy","handlingStrategy":"validation","validationCode":"fn ax_submittable(order: &OrderAny) -> bool {\n    matches!(order.order_type(), OrderType::Market | OrderType::Limit)\n        && matches!(order.time_in_force(), TimeInForce::Gtc | TimeInForce::Ioc | TimeInForce::Day)\n        && order.quantity().as_f64() >= 1.0\n}","typeGuard":null,"tryCatchPattern":"match validate_order_for_ax_submit(&order) {\n    Ok(()) => exec_client.submit_order(order).await?,\n    Err(e) => log::warn!(\"order not AX-compatible, handling locally: {e}\"),\n}","preventionTips":["Restrict strategies targeting AX to MARKET/LIMIT orders with GTC/IOC/DAY","Implement stop/contingent logic client-side or via Nautilus exec emulation","Add a pre-submit validation step in the strategy matching the adapter's rules"],"tags":["rust","adapter","orders","validation","unsupported-operation"],"backgroundTag":"unsupported-operation","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}