{"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":"validation","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/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/binance/src/futures/websocket/streams/parse_exec.rs#L447-L483","documentation":"parse_algo_limit_price requires a positive limit price for algo order types where requires_algo_limit_price is true (e.g. STOP, TAKE_PROFIT — limit-style conditional orders). If algo_data.price is missing, zero, or negative for such a type, parsing the update fails.","triggerScenarios":"Receiving a futures algo update for a limit-style conditional order (e.g. STOP / TAKE_PROFIT) whose price field is empty or non-positive.","commonSituations":"Exchange reporting zeroed price on cancelled/expired algo orders; a payload for a market-style order type being misclassified as limit-style; test fixtures omitting price.","solutions":["Ensure limit-style conditional orders carry a positive price field; refetch via REST if stream data is incomplete.","Check that algo_data.order_type is correctly classified so market variants don't require a price.","Fix test payloads to include a valid price."],"exampleFix":"// before\n{\"o\": {\"ot\": \"STOP\", \"p\": \"0\"}}\n// after\n{\"o\": {\"ot\": \"STOP\", \"p\": \"24950.00\"}}","handlingStrategy":"validation","validationCode":"fn needs_limit_price(order_type: &str) -> bool {\n    matches!(order_type, \"STOP\" | \"TAKE_PROFIT\")\n}\nif needs_limit_price(ot) && price.parse::<f64>().map(|v| v <= 0.0).unwrap_or(true) {\n    return Err(\"limit-style algo update requires positive price\");\n}","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"missing positive price\") => {\n        tracing::warn!(\"algo stream update lacks limit price; reconcile via REST\");\n    }\n    r => r?,\n}","preventionTips":["Place limit-style conditional orders (STOP/TAKE_PROFIT) with a valid price.","Confirm order-type classification before assuming which fields are required.","Include terminal-state payloads with zeroed prices in parser tests."],"tags":["algo-orders","websocket","price","binance-futures"],"backgroundTag":"missing-required-argument","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"}