{"record":{"id":"cbf662600cf5a357","repo":"nautechsystems/nautilus_trader","slug":"failed-to-build-order-params-e","errorCode":null,"errorMessage":"Failed to build order params: {e}","messagePattern":"Failed to build order params: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/kraken/src/http/futures/client.rs","lineNumber":2026,"sourceCode":"\n                if let Some(limit) = price {\n                    builder.limit_price(limit.to_string());\n                }\n            }\n            _ => {\n                if let Some(limit) = price {\n                    builder.limit_price(limit.to_string());\n                }\n            }\n        }\n\n        if reduce_only {\n            builder.reduce_only(true);\n        }\n\n        builder\n            .build()\n            .map_err(|e| anyhow::anyhow!(\"Failed to build order params: {e}\"))\n    }\n\n    /// Submits a new order to the Kraken Futures exchange.\n    ///\n    /// # Errors\n    ///\n    /// Returns an error if:\n    /// - Credentials are missing.\n    /// - The instrument is not found in cache.\n    /// - The order type or time in force is not supported.\n    /// - The request fails.\n    /// - The order is rejected.\n    #[expect(clippy::too_many_arguments)]\n    pub async fn submit_order(\n        &self,\n        account_id: AccountId,\n        instrument_id: InstrumentId,\n        client_order_id: ClientOrderId,","sourceCodeStart":2008,"sourceCodeEnd":2044,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/kraken/src/http/futures/client.rs#L2008-L2044","documentation":"Raised when the KrakenFuturesOrderParams builder's build() fails after assembling order fields from a Nautilus order. It means one or more order attributes (price, quantity, trigger signals, reduce-only flags) produced an invalid parameter combination for Kraken Futures.","triggerScenarios":"build_send_order_params is called by submit_order or send_order_batches and the builder validation rejects the assembled params — e.g. an unsupported trigger/contingency signal type on the order, or invalid price/quantity formatting.","commonSituations":"Submitting order types whose trigger signals Kraken Futures doesn't support (hence the paired tests for supported/unsupported trigger signals); stop/limit orders with missing or malformed prices; orders built with quantity precision Kraken rejects.","solutions":["Read the wrapped error to see which parameter failed validation.","Confirm the order's trigger signal type is supported by Kraken Futures (see test_build_send_order_params_maps_supported_trigger_signals).","Verify price/quantity precision matches the instrument's tick/step size.","Check that order type, time-in-force, and contingency fields form a valid combination for Kraken Futures."],"exampleFix":"// before\nlet order = order_factory.limit( instrument_id, Side::Buy, qty_from_f64(0.123456789), price_from_f64(1234.56789), ...); // precision mismatch\n// after\nlet qty = Quantity::new(0.1, instrument.size_precision);\nlet price = Price::new(1234.5, instrument.price_precision);","handlingStrategy":"validation","validationCode":"assert_eq!(order.quantity.precision, instrument.size_precision);\nassert!(supported_trigger_signals().contains(&order.trigger_signal()));","typeGuard":null,"tryCatchPattern":"let params = build_send_order_params(&order, &instrument)\n    .context(\"preparing Kraken Futures order params\")?; // fail before network call","preventionTips":["Check Kraken Futures trigger-signal support before building stop/contingent orders.","Normalize price/quantity to instrument precision at order creation time.","Add unit tests mirroring test_build_send_order_params_* for every order type you submit."],"tags":["orders","validation","kraken","futures","params"],"backgroundTag":"invalid-argument-value","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}