{"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":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/architect_ax/src/execution.rs","lineNumber":278,"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":260,"sourceCodeEnd":296,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/architect_ax/src/execution.rs#L260-L296","documentation":"Raised in `submit_order_internal` when the AX aggressive-limit preview response contains no `limit_price` (the `ok_or_else` on `response.limit_price`). AX could not determine any price at which the market order could fill, meaning there is no liquidity available for the requested order, so the adapter refuses to price and submit the order.","triggerScenarios":"Submitting a MARKET order on an instrument whose order book is empty or has no actionable liquidity at preview time; the preview returns filled_quantity 0 / remaining_quantity > 0 with `limit_price: None`.","commonSituations":"Trading a very illiquid or halted instrument; submitting large market orders that exceed available depth; trading outside the venue's market hours when the book is empty; instrument with one-sided book.","solutions":["Use a LIMIT order with an explicit price instead of a MARKET order when liquidity is thin.","Reduce the order quantity to fit within available book depth (the code already warns on filled/remaining shortfall).","Check the instrument is currently trading (not halted) and within market hours.","Verify the symbol/order book is streaming correctly and the book is not empty due to a feed issue.","Retry later if the book is temporarily empty."],"exampleFix":"// before\nlet order = OrderFactory::market(instrument_id, OrderSide::Buy, qty);\n// after\n// use a priced limit order when liquidity may be absent\nlet order = OrderFactory::limit(instrument_id, OrderSide::Buy, qty, limit_price);","handlingStrategy":"fallback","validationCode":"// ensure market data is flowing and book is non-empty before a market order\nif best_bid.is_none() || best_ask.is_none() {\n    anyhow::bail!(\"no two-sided book for {instrument_id}; avoid naked market order\");\n}","typeGuard":null,"tryCatchPattern":"match engine.submit_order(market_order) {\n    Err(e) if e.to_string().contains(\"No liquidity available\") => {\n        // fall back to a priced limit order or reduce size\n        log::warn!(\"no liquidity for market order on {}\", market_order.instrument_id());\n    }\n    other => other?,\n}","preventionTips":["Check current book depth before sending market orders, especially for illiquid symbols.","Cap market order size relative to visible top-of-book depth.","Verify the instrument is trading and not halted before market orders.","Confirm market data subscriptions are live so the book isn't stale/empty."],"tags":["liquidity","market-order","orders","no-fill"],"backgroundTag":"insufficient-liquidity","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"}