{"record":{"id":"2e2aabfba5586c28","repo":"nautechsystems/nautilus_trader","slug":"failed-to-build-order-query-params-e","errorCode":null,"errorMessage":"failed to build order query params: {e}","messagePattern":"failed to build order query params: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/futures/execution.rs","lineNumber":2366,"sourceCode":"                    Err(e) => log::warn!(\"Failed to query algo order status: {e}\"),\n                }\n\n                return Ok(());\n            }\n\n            let mut builder = BinanceOrderQueryParamsBuilder::default();\n            builder.symbol(symbol.clone());\n\n            if let Some(oid) = order_id {\n                builder.order_id(oid);\n            }\n\n            if let Some(coid) = orig_client_order_id {\n                builder.orig_client_order_id(coid);\n            }\n            let params = builder\n                .build()\n                .map_err(|e| anyhow::anyhow!(\"failed to build order query params: {e}\"))?;\n\n            let result = http_client.query_order(&params).await;\n\n            match result {\n                Ok(order) => {\n                    let ts_init = clock.get_time_ns();\n                    let report = order.to_order_status_report(\n                        account_id,\n                        command.instrument_id,\n                        price_precision,\n                        size_precision,\n                        treat_expired_as_canceled,\n                        ts_init,\n                    )?;\n\n                    emitter.send_order_status_report(report);\n                }\n                Err(BinanceFuturesHttpError::BinanceError { code: -2013, .. }) => {","sourceCodeStart":2348,"sourceCodeEnd":2384,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/a4b06ed870971b5671d12754ea138a3ab99b1dec/crates/adapters/binance/src/futures/execution.rs#L2348-L2384","documentation":"Maps a derive_builder validation failure while constructing BinanceOrderQueryParams for the order query. symbol is the only required field and is always set from the command's instrument_id, while orig_client_order_id is always populated via encode_broker_id, so this error is a defensive path rather than a runtime condition.","triggerScenarios":"The spawned query_order task builds BinanceOrderQueryParamsBuilder with symbol plus optional order_id / orig_client_order_id and .build() returns Err — only realistic in modified code that drops the symbol setter.","commonSituations":"Order status queries in custom builds of the adapter; unreachable as shipped.","solutions":["Ensure symbol is set on the builder before .build()","Inspect {e} for the missing field name","Report as a bug if unmodified code produces it"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"Catch the anyhow::Error in the query_order task result and log with the client_order_id; deterministic, so no retry.","preventionTips":["Pin adapter versions in production","Smoke-test order status queries after upgrades","In forks, keep the symbol setter on BinanceOrderQueryParamsBuilder"],"tags":["binance","futures","query-order","derive-builder","rust"],"backgroundTag":"builder-validation-failed","analyzedSha":"a4b06ed870971b5671d12754ea138a3ab99b1dec","analyzedAt":"2026-08-16T22:54:50.089Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}