nautechsystems/nautilus_trader · error · anyhow::Error
Unsupported order type: {:?}, the Architect AX adapter accep
Error message
Unsupported order type: {:?}, the Architect AX adapter accepts Nautilus MARKET and LIMIT orders What it means
Local pre-flight validation in validate_order_for_ax_submit: the adapter can only encode Nautilus MARKET and LIMIT orders into AX's order model. Any other OrderType (STOP_MARKET, STOP_LIMIT, MARKET_TO_LIMIT, ...) is rejected before anything is sent, producing a denied submit rather than an opaque venue error. AX emulates market orders internally, so the two accepted types cover all supported behavior.
Source
Thrown at crates/adapters/architect_ax/src/execution.rs:1875
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 a4b06ed870)
Solutions
- Replace stop orders with plain LIMIT or MARKET orders on AX
- Emulate stops locally: subscribe to trades/quotes in the strategy and fire a MARKET order when the stop level trades
- If you need server-side protection, check whether Architect supports a different order product for your account and use that outside this adapter
Example fix
// before
let stop = factory.stop_market(id, side, qty, trigger_px);
self.submit_order(&stop); // -> Unsupported order type
// after: local stop emulation
if price_crossed(trigger_px) {
let mkt = factory.market(id, side, qty);
self.submit_order(&mkt);
} Defensive patterns
Strategy: validation
Validate before calling
// Reject unsupported types before they reach the engine
fn ax_order_type_ok(t: OrderType) -> bool {
matches!(t, OrderType::Market | OrderType::Limit)
}
debug_assert!(ax_order_type_ok(order.order_type())); Type guard
fn is_ax_supported_order_type(t: OrderType) -> bool {
matches!(t, OrderType::Market | OrderType::Limit)
} Prevention
- Implement stop-loss logic locally (price trigger -> MARKET order) when running on AX
- Audit bracket/OCO templates before porting a strategy to AX - legs must be MARKET/LIMIT only
- Add a strategy-level unit test that every order type you emit is in {Market, Limit}
When it happens
Trigger: Strategy submits a stop or stop-limit order (factory.stop_market / factory.stop_limit, or an order initialized with those types) to the AX execution client; bracket/OCO order packs whose entry legs contain stop-type orders.
Common situations: Porting a strategy from a venue that supports native stops (Binance, Bybit) to AX; using standard bracket-order helpers that attach stop-loss legs without remembering AX cannot take them.
Related errors
- Unsupported time in force: {:?}, AX supports GTC, IOC, and D
- AX does not support reduce-only orders
- Architect AX adapter cannot encode quote_quantity; submit a
- Architect AX adapter cannot encode display_qty iceberg instr
- AX requires whole contract quantities, was {}
AI-assisted analysis of nautechsystems/nautilus_trader@a4b06ed870 (2026-08-16).
Data as JSON: /api/errors/49b295b325e7cc42.
Report an issue: GitHub.