{"record":{"id":"35f8453886b5520a","repo":"nautechsystems/nautilus_trader","slug":"no-liquidity-available-for-market-order-on-instru","errorCode":null,"errorMessage":"No liquidity available for market order on {instrument_id}","messagePattern":"No liquidity available for market order on (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/architect_ax/src/execution.rs","lineNumber":255,"sourceCode":"                    let response = http_client\n                        .inner\n                        .preview_aggressive_limit_order(&request)\n                        .await\n                        .map_err(|e| {\n                            anyhow::anyhow!(\"Failed to preview aggressive limit order: {e}\")\n                        })?;\n\n                    if response.remaining_quantity > 0 {\n                        log::warn!(\n                            \"Market order book depth insufficient: \\\n                             filled_qty={} remaining_qty={} for {instrument_id}\",\n                            response.filled_quantity,\n                            response.remaining_quantity,\n                        );\n                    }\n\n                    let limit_price_decimal = response.limit_price.ok_or_else(|| {\n                        anyhow::anyhow!(\n                            \"No liquidity available for market order on {instrument_id}\"\n                        )\n                    })?;\n\n                    let price =\n                        Price::from_decimal_dp(limit_price_decimal, instrument.price_precision())\n                            .with_context(|| {\n                                format!(\n                                    \"Failed to convert AX take-through price {limit_price_decimal} for {instrument_id}\"\n                                )\n                            })?;\n                    log::debug!(\"Market order take-through price: {price} for {instrument_id}\",);\n                    Ok(price)\n                }\n                .await;\n\n                let price = match preview_result {\n                    Ok(price) => price,","sourceCodeStart":237,"sourceCodeEnd":273,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/a4b06ed870971b5671d12754ea138a3ab99b1dec/crates/adapters/architect_ax/src/execution.rs#L237-L273","documentation":"The preview call for an emulated MARKET order succeeded but returned limit_price = None. AX returns a take-through price only when the book has resting liquidity on the side you cross; a None price means the preview found no actionable depth (empty or one-sided book), so the adapter cannot price the IOC limit and refuses to submit rather than send an unpriced order. The remaining_quantity warning above it may also signal a too-thin book for your size.","triggerScenarios":"Market order on an illiquid symbol whose book is empty on the crossed side (new listing, overnight halt, stale venue book); trading outside the instrument's active hours; requesting more size than the entire book holds.","commonSituations":"Backtest-only symbols that are actually dead in production; testnet instruments with fake sparse books; market orders sent right at auction open/close where the continuous book is empty.","solutions":["Subscribe to quotes for the instrument and require a bid/ask on both sides before sending market orders","Send an aggressive LIMIT order (e.g. mid +/- k*spread) instead of MARKET so pricing does not depend on preview","Reduce size and/or wait for the book to repopulate, then retry","Confirm the instrument is in its active trading session on AX"],"exampleFix":"// before\nif best_bid.is_none() || best_ask.is_none() {\n    self.submit_order(&factory.market(id, side, qty)); // -> No liquidity\n}\n// after\nif let (Some(bid), Some(ask)) = (best_bid, best_ask) {\n    let px = if side == OrderSide::Buy { ask + offset } else { bid - offset };\n    self.submit_order(&factory.limit(id, side, qty, px, TimeInForce::Ioc));\n}","handlingStrategy":"validation","validationCode":"// Require two-sided liquidity before any MARKET order\nlet book_ok = self.cache.book_order(id, BookType::Default)\n    .map(|b| b.best_bid_price().is_some() && b.best_ask_price().is_some())\n    .unwrap_or(false);\nif !book_ok {\n    self.warning(\"no two-sided book; skipping MARKET order\");\n    return;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Subscribe to quotes for every instrument you may market-order","Cap market-order size to a fraction of visible depth on the crossed side","Prefer IOC limits with an explicit price so empty books simply rest or cancel instead of erroring"],"tags":["architect-ax","market-order","liquidity","order-book","rust"],"backgroundTag":"insufficient-liquidity","analyzedSha":"a4b06ed870971b5671d12754ea138a3ab99b1dec","analyzedAt":"2026-08-16T22:54:50.089Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}