{"record":{"id":"80fedba265c99071","repo":"nautechsystems/nautilus_trader","slug":"algo-order-type-order-type-requires-a-trigger","errorCode":null,"errorMessage":"Algo order type {order_type:?} requires a trigger price","messagePattern":"Algo order type (.+?) requires a trigger price","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/futures/http/client.rs","lineNumber":2177,"sourceCode":"        working_type: Option<BinanceWorkingType>,\n        good_till_date: Option<i64>,\n    ) -> anyhow::Result<OrderStatusReport> {\n        let symbol = format_binance_symbol(&instrument_id);\n        let size_precision = self.get_size_precision(&symbol)?;\n        let price_precision = self.get_price_precision(&symbol)?;\n\n        let binance_side = BinanceSide::try_from(order_side)?;\n        let binance_order_type = order_type_to_binance_futures(order_type)?;\n        let binance_tif = BinanceTimeInForce::try_from(time_in_force)?;\n\n        let requires_trigger_price = matches!(\n            order_type,\n            OrderType::StopMarket\n                | OrderType::StopLimit\n                | OrderType::MarketIfTouched\n                | OrderType::LimitIfTouched\n        );\n        anyhow::ensure!(\n            !requires_trigger_price || trigger_price.is_some(),\n            \"Algo order type {order_type:?} requires a trigger price\"\n        );\n\n        // Limit orders require time in force\n        let requires_time_in_force =\n            matches!(order_type, OrderType::StopLimit | OrderType::LimitIfTouched);\n\n        let price_str = price.map(|p| p.to_string());\n        let trigger_price_str = if matches!(order_type, OrderType::TrailingStopMarket) {\n            None\n        } else {\n            trigger_price.map(|p| p.to_string())\n        };\n        let reduce_only = reduce_only_param(reduce_only, position_side);\n        let client_id_str = encode_broker_id(&client_order_id, BINANCE_NAUTILUS_FUTURES_BROKER_ID);\n\n        // closePosition is mutually exclusive with quantity and reduceOnly","sourceCodeStart":2159,"sourceCodeEnd":2195,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/a4b06ed870971b5671d12754ea138a3ab99b1dec/crates/adapters/binance/src/futures/http/client.rs#L2159-L2195","documentation":"The same trigger-price pre-flight check applied on the algo order path of the futures HTTP client: STOP_MARKET, STOP_LIMIT, MARKET_IF_TOUCHED and LIMIT_IF_TOUCHED submissions through the algo endpoints must carry a trigger price. TRAILING_STOP_MARKET is exempt on this path because it is configured via callback rate instead.","triggerScenarios":"Algo-routed submissions (strategy config or params selecting the algo API) with a stop-family order and trigger_price None.","commonSituations":"Enabling algo/SOR routing for stop orders whose factory config omitted the trigger; porting stop logic between the standard and algo order paths.","solutions":["Set the trigger price on the order before submitting through the algo API","If the order genuinely has no trigger, submit it through the standard order path instead of the algo path"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Before submitting via the algo path\nlet needs_trigger = matches!(\n    order.order_type(),\n    OrderType::StopMarket | OrderType::StopLimit | OrderType::MarketIfTouched | OrderType::LimitIfTouched\n);\nassert!(!needs_trigger || trigger_price.is_some(), \"algo order needs trigger price\");","typeGuard":"fn algo_requires_trigger_price(order_type: OrderType) -> bool {\n    matches!(\n        order_type,\n        OrderType::StopMarket | OrderType::StopLimit | OrderType::MarketIfTouched | OrderType::LimitIfTouched\n    )\n}","tryCatchPattern":"On this local rejection, resubmit with a trigger price set, or route the order through the standard (non-algo) submission path if it truly has no trigger.","preventionTips":["Verify stop-family orders carry triggers before enabling algo routing for them","Test algo-path submissions in testnet before live deployment","Keep trigger-price requirements in the order factory checks"],"tags":["binance","futures","algo-orders","trigger-price","order-validation","rust"],"backgroundTag":"missing-trigger-price","analyzedSha":"a4b06ed870971b5671d12754ea138a3ab99b1dec","analyzedAt":"2026-08-16T22:54:50.089Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}