{"record":{"id":"531376f363a894b7","repo":"nautechsystems/nautilus_trader","slug":"e-531376","errorCode":null,"errorMessage":"{e}","messagePattern":"\\{e\\}","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"warning","filePath":"crates/adapters/binance/src/futures/execution.rs","lineNumber":1749,"sourceCode":"                    .parse::<i64>()\n                    .context(\"failed to parse venue_order_id as numeric\")\n            })\n            .transpose()?;\n        let orig_client_order_id = cmd\n            .client_order_id\n            .map(|id| encode_broker_id(&id, BINANCE_NAUTILUS_FUTURES_BROKER_ID));\n\n        let mut builder = BinanceOrderQueryParamsBuilder::default();\n        builder.symbol(symbol);\n\n        if let Some(oid) = order_id {\n            builder.order_id(oid);\n        }\n\n        if let Some(ref coid) = orig_client_order_id {\n            builder.orig_client_order_id(coid.clone());\n        }\n        let params = builder.build().map_err(|e| anyhow::anyhow!(\"{e}\"))?;\n\n        let (price_precision, size_precision) = self.get_instrument_precision(instrument_id);\n        let ts_init = self.clock.get_time_ns();\n        let algo_lookup = self.resolve_algo_lookup(cmd.client_order_id, cmd.params.as_ref());\n\n        if algo_lookup == BinanceFuturesAlgoLookup::AlgoId {\n            let algo_order = self\n                .http_client\n                .query_algo_order_with_history(\n                    instrument_id,\n                    cmd.client_order_id,\n                    cmd.venue_order_id,\n                )\n                .await?;\n\n            return match algo_order {\n                Some(result) => Ok(Some(create_algo_order_status_report(\n                    &result,","sourceCodeStart":1731,"sourceCodeEnd":1767,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/a4b06ed870971b5671d12754ea138a3ab99b1dec/crates/adapters/binance/src/futures/execution.rs#L1731-L1767","documentation":"In the single-order status report path, BinanceOrderQueryParams is built with derive_builder and any build() error is re-wrapped as anyhow with only the builder's error string, so the surfaced message is whatever the builder produced. In the current code every field of BinanceOrderQueryParams is Option/defaulted (query.rs:272-286), which makes this a defensive path that should not fire in practice — if it does, the wrapped {e} names the unmet builder invariant (e.g. a missing required field added in a future version).","triggerScenarios":"generate_order_status_reports (mass status or single-order query) reaching builder.build() with fields that fail the builder's invariants — currently none exist, so a hit implies a version where symbol/order-id fields became required and were not set.","commonSituations":"Upgrading the adapter to a version that adds required fields to the query params structs while calling code constructs the builder manually; custom forks adding validation to these builders.","solutions":["Read the wrapped {e}: it names the exact missing/invalid field — supply it (symbol via format_binance_symbol, order_id or orig_client_order_id)","Ensure the queried order carries a venue_order_id or orig_client_order_id so the query is well-formed","If unreachable in your version, treat a hit as an adapter regression and report it with the error string"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Ensure the query is well-formed before requesting a report:\nanyhow::ensure!(\n    cmd.venue_order_id.is_some() || cmd.orig_client_order_id.is_some(),\n    \"single-order query needs venue_order_id or orig_client_order_id\"\n);\nlet _ = format_binance_symbol(&instrument_id); // symbol must format cleanly","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always carry a venue_order_id or orig_client_order_id on order-status queries","Validate instrument ids resolve to symbols before report generation","Treat any '{e}'-only error from the params builders as a version regression to report upstream"],"tags":["binance-futures","order-status-report","query-params","builder","rust"],"backgroundTag":"invalid-query-parameters","analyzedSha":"a4b06ed870971b5671d12754ea138a3ab99b1dec","analyzedAt":"2026-08-16T22:54:50.089Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}