{"record":{"id":"924b64de22485d84","repo":"nautechsystems/nautilus_trader","slug":"missing-positive-trigger-price-for-binance-algo-or-924b64","errorCode":null,"errorMessage":"missing positive trigger_price for Binance algo order type {:?}","messagePattern":"missing positive trigger_price for Binance algo order type (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/futures/websocket/streams/parse_exec.rs","lineNumber":449,"sourceCode":"    }\n\n    Price::from_decimal_dp(decimal, precision)\n        .map(Some)\n        .map_err(|e| anyhow::anyhow!(\"invalid {field} precision: {e}\"))\n}\n\nfn parse_algo_trigger_price(\n    algo_data: &AlgoOrderUpdateData,\n    price_precision: u8,\n) -> anyhow::Result<Option<Price>> {\n    let trigger_price = parse_positive_price_at_precision(\n        &algo_data.trigger_price,\n        price_precision,\n        \"trigger_price\",\n    )?;\n\n    if trigger_price.is_none() && requires_algo_trigger_price(algo_data.order_type) {\n        anyhow::bail!(\n            \"missing positive trigger_price for Binance algo order type {:?}\",\n            algo_data.order_type\n        );\n    }\n\n    Ok(trigger_price)\n}\n\nfn parse_algo_limit_price(\n    algo_data: &AlgoOrderUpdateData,\n    price_precision: u8,\n) -> anyhow::Result<Option<Price>> {\n    let price = parse_positive_price_at_precision(&algo_data.price, price_precision, \"price\")?;\n\n    if price.is_none() && requires_algo_limit_price(algo_data.order_type) {\n        anyhow::bail!(\n            \"missing positive price for Binance algo order type {:?}\",\n            algo_data.order_type","sourceCodeStart":431,"sourceCodeEnd":467,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/a4b06ed870971b5671d12754ea138a3ab99b1dec/crates/adapters/binance/src/futures/websocket/streams/parse_exec.rs#L431-L467","documentation":"For Binance Futures algo (conditional) order updates, the adapter requires a positive trigger_price whenever the order type is STOP, STOP_MARKET, TAKE_PROFIT, or TAKE_PROFIT_MARKET (requires_algo_trigger_price). The parsed trigger_price came back None because the raw field was empty, zero, or negative, so the update is rejected instead of silently accepted.","triggerScenarios":"An algo order update arrives for a STOP / STOP_MARKET / TAKE_PROFIT / TAKE_PROFIT_MARKET order whose trigger_price string is missing, \"0\", or negative, so parse_positive_price_at_precision returned None and the requirement check fails.","commonSituations":"A strategy submitted a conditional order without a valid trigger (stop) price; Binance added or renamed an algo order type so the local enum mapping misclassifies it as trigger-requiring; malformed upstream event during connectivity issues.","solutions":["Ensure conditional orders are always submitted with a strictly positive trigger/stop price","Update NautilusTrader to the latest version so any newly mapped Binance order types are handled correctly","Capture the raw algo order update payload (order type and trigger_price fields) and open an issue if the order type genuinely never carries a trigger price, which indicates a mapping bug"],"exampleFix":"# before\nfrom nautilus_trader.model.objects import Price\n# trigger_price omitted or set to 0 when submitting a STOP_MARKET\n\n# after\norder = trader.submit_order(\n    strategy.stop_market(\n        instrument_id,\n        quantity,\n        trigger_price=Price.from_str(\"42000.00\"),  # strictly positive\n    )\n)","handlingStrategy":"validation","validationCode":"from nautilus_trader.model.objects import Price\n\ndef valid_trigger(trigger_price) -> bool:\n    return trigger_price is not None and trigger_price.as_double() > 0\n\nassert valid_trigger(strategy.trigger_price), \"STOP/TAKE_PROFIT orders need a positive trigger price\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate trigger prices are strictly positive before submitting conditional orders","Unit-test order factories to forbid zero/None trigger prices","Keep the adapter updated so Binance order-type mappings stay current"],"tags":["binance","futures","algo-order","trigger-price","order-validation"],"backgroundTag":"missing-required-field","analyzedSha":"a4b06ed870971b5671d12754ea138a3ab99b1dec","analyzedAt":"2026-08-16T22:54:50.089Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}