{"record":{"id":"bd169ecf761cf606","repo":"nautechsystems/nautilus_trader","slug":"missing-positive-price-for-binance-algo-order-type","errorCode":null,"errorMessage":"missing positive price for Binance algo order type {:?}","messagePattern":"missing positive 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":465,"sourceCode":"\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\n        );\n    }\n\n    Ok(price)\n}\n\nfn parse_trailing_offset_basis_points(raw: &str) -> Option<Decimal> {\n    let rate = parse_required_decimal(raw, \"callback_rate\").ok()?;\n    if rate <= Decimal::ZERO {\n        return None;\n    }\n\n    rate.checked_mul(Decimal::from(100))\n}\n\nfn parse_working_type(working_type: BinanceWorkingType) -> TriggerType {","sourceCodeStart":447,"sourceCodeEnd":483,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/a4b06ed870971b5671d12754ea138a3ab99b1dec/crates/adapters/binance/src/futures/websocket/streams/parse_exec.rs#L447-L483","documentation":"Companion of the trigger-price check: for Binance Futures algo order updates of type STOP or TAKE_PROFIT (the limit variants, per requires_algo_limit_price), a positive limit price is mandatory. The parsed price was None (empty, zero, or negative raw string), so the update is rejected rather than turned into a malformed order report.","triggerScenarios":"An algo order update for a STOP or TAKE_PROFIT (limit) order whose price field is missing, \"0\", or negative, so parse_positive_price_at_precision returned None and the requirement check fails.","commonSituations":"Submitting a STOP_LIMIT / TAKE_PROFIT_LIMIT style order without a limit price; a strategy computing the limit price to 0 due to a rounding or sizing bug; upstream enum changes misclassifying the order type.","solutions":["Ensure STOP and TAKE_PROFIT orders are always submitted with a strictly positive limit price","Log the computed limit price at submission time to catch zero/negative values from sizing logic before they reach the venue","If the venue legitimately sends these types without a price, capture the raw payload and report upstream as an order-type mapping bug"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"from nautilus_trader.model.objects import Price\n\ndef valid_limit(price: Price | None) -> bool:\n    return price is not None and price.as_double() > 0\n\nassert valid_limit(order_factory_price), \"STOP/TAKE_PROFIT limit orders need a positive limit price\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate limit prices are strictly positive before submitting STOP/TAKE_PROFIT orders","Log computed limit prices at submission to catch zero results from sizing bugs","Keep the adapter version current for order-type mapping fixes"],"tags":["binance","futures","algo-order","limit-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"}