{"record":{"id":"dd49705ee3d9f372","repo":"nautechsystems/nautilus_trader","slug":"order-type-order-type-requires-a-trigger-price","errorCode":null,"errorMessage":"Order type {order_type:?} requires a trigger price","messagePattern":"Order type (.+?) requires a trigger price","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/futures/http/client.rs","lineNumber":2073,"sourceCode":"        let binance_side = BinanceSide::try_from(order_side)?;\n        let binance_order_type = order_type_to_binance_futures(order_type)?;\n        let binance_tif = if post_only {\n            BinanceTimeInForce::Gtx\n        } else {\n            BinanceTimeInForce::try_from(time_in_force)?\n        };\n\n        let requires_trigger_price = matches!(\n            order_type,\n            OrderType::StopMarket\n                | OrderType::StopLimit\n                | OrderType::TrailingStopMarket\n                | OrderType::MarketIfTouched\n                | OrderType::LimitIfTouched\n        );\n\n        if requires_trigger_price && trigger_price.is_none() {\n            anyhow::bail!(\"Order type {order_type:?} requires a trigger price\");\n        }\n\n        // MARKET and STOP_MARKET orders don't accept timeInForce\n        let requires_time_in_force = matches!(\n            order_type,\n            OrderType::Limit | OrderType::StopLimit | OrderType::LimitIfTouched\n        );\n\n        let qty_str = quantity.to_string();\n        let price_str = if price_match.is_some() {\n            None\n        } else {\n            price.map(|p| p.to_string())\n        };\n        let stop_price_str = trigger_price.map(|p| p.to_string());\n        let client_id_str = encode_broker_id(&client_order_id, BINANCE_NAUTILUS_FUTURES_BROKER_ID);\n\n        let params = BinanceNewOrderParams {","sourceCodeStart":2055,"sourceCodeEnd":2091,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/a4b06ed870971b5671d12754ea138a3ab99b1dec/crates/adapters/binance/src/futures/http/client.rs#L2055-L2091","documentation":"Local pre-flight validation in the futures HTTP client's order submission path: STOP_MARKET, STOP_LIMIT, TRAILING_STOP_MARKET, MARKET_IF_TOUCHED and LIMIT_IF_TOUCHED orders all require a stop/trigger price on Binance Futures. If trigger_price is None for one of these types, the request is rejected before any HTTP call is made.","triggerScenarios":"submit_order (HTTP path) for one of those order types with no trigger price supplied — e.g. a strategy built a stop order without a trigger or a factory call omitted the trigger argument.","commonSituations":"Factory misuse; strategies ported from venues where triggers are optional; optional-argument mistakes in order builders; config-driven order templates missing the trigger field.","solutions":["Provide the trigger (stop) price when creating stop-family orders","For TRAILING_STOP_MARKET note this check still requires a trigger price even though the offset uses callback rate","Add a pre-submit assertion in strategy code for stop-family orders"],"exampleFix":"// before — stop order without a trigger\n// StopMarketOrder::new(..., trigger_price: None, ...)\n\n// after — supply the trigger price\n// StopMarketOrder::new(..., trigger_price: Some(price), ...)","handlingStrategy":"validation","validationCode":"// Before submit_order()\nlet needs_trigger = matches!(\n    order.order_type(),\n    OrderType::StopMarket | OrderType::StopLimit | OrderType::TrailingStopMarket\n        | OrderType::MarketIfTouched | OrderType::LimitIfTouched\n);\nassert!(!needs_trigger || order.trigger_price().is_some(), \"trigger price required\");","typeGuard":"fn requires_trigger_price(order_type: OrderType) -> bool {\n    matches!(\n        order_type,\n        OrderType::StopMarket | OrderType::StopLimit | OrderType::TrailingStopMarket\n            | OrderType::MarketIfTouched | OrderType::LimitIfTouched\n    )\n}","tryCatchPattern":"On this local rejection, create the order again with a trigger price set and resubmit; nothing reached the venue so the retry is safe.","preventionTips":["Assert trigger_price.is_some() for stop-family orders in strategy unit tests","Centralize order creation in factories that always pair stop types with triggers","Review order templates when porting between venues"],"tags":["binance","futures","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"}