{"record":{"id":"67901050f484729f","repo":"nautechsystems/nautilus_trader","slug":"no-order-ordertrigger-or-orderpriorexecution-dat","errorCode":null,"errorMessage":"No order, orderTrigger, or orderPriorExecution data in event","messagePattern":"No order, orderTrigger, or orderPriorExecution data in event","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/kraken/src/http/futures/client.rs","lineNumber":2195,"sourceCode":"                    }\n                } else if let Some(prior_exec) = &send_event.order_prior_execution {\n                    // EXECUTION event - use orderPriorExecution data\n                    FuturesOrderEvent {\n                        order_id: prior_exec.order_id.clone(),\n                        cli_ord_id: prior_exec.cli_ord_id.clone(),\n                        order_type: prior_exec.order_type,\n                        symbol: prior_exec.symbol.clone(),\n                        side: prior_exec.side,\n                        quantity: prior_exec.quantity,\n                        filled: send_event.amount.unwrap_or(prior_exec.quantity), // Use execution amount\n                        limit_price: prior_exec.limit_price,\n                        stop_price: prior_exec.stop_price,\n                        timestamp: prior_exec.timestamp.clone(),\n                        last_update_timestamp: prior_exec.last_update_timestamp.clone(),\n                        reduce_only: prior_exec.reduce_only,\n                    }\n                } else {\n                    anyhow::bail!(\"No order, orderTrigger, or orderPriorExecution data in event\");\n                };\n                return parse_futures_order_event_status_report(\n                    &event,\n                    Some(send_event.event_type),\n                    &instrument,\n                    account_id,\n                    ts_init,\n                );\n            }\n\n            // Fall back to querying order events\n            let events_response = self.inner.get_order_events(None, None, None).await?;\n            let event_wrapper = events_response\n                .order_events\n                .iter()\n                .find(|e| e.order.order_id == venue_order_id)\n                .ok_or_else(|| {\n                    anyhow::anyhow!(\"Order not found in open orders or events: {venue_order_id}\")","sourceCodeStart":2177,"sourceCodeEnd":2213,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/kraken/src/http/futures/client.rs#L2177-L2213","documentation":"submit_order on Kraken Futures handles multiple event payloads (order, orderTrigger, orderPriorExecution). When the send_event contains none of these payload variants there is no data from which to build an order request, so the client bails. This is a guard against malformed or incomplete order submission events reaching the adapter.","triggerScenarios":"Calling submit_order with an event whose send_event payload is empty or carries none of the order/orderTrigger/orderPriorExecution variants, e.g. an internally constructed order event missing its request payload, or an event type routed to this branch that never carried order data.","commonSituations":"Custom strategies submitting manually constructed OrderRequest events without the expected payload fields; version drift where the event schema changed and the payload no longer matches; bugs in upstream code that drops the order data before it reaches the adapter.","solutions":["Inspect the OrderRequest/submit event and ensure it contains a populated order (or orderTrigger/orderPriorExecution) payload before calling submit_order.","Log the full event at the call site to confirm which payload variant is present; fix construction of the event accordingly.","Verify adapter/event type routing: only events carrying order data should reach this code path.","Check for version mismatches between nautilus_core event definitions and the kraken adapter's expected payload shape."],"exampleFix":"// before: event constructed without payload\nlet event = OrderRequest::new(instrument_id, account_id, None);\nclient.submit_order(event).await?;\n\n// after: attach the order payload\nlet event = OrderRequest::new(instrument_id, account_id, Some(order_payload));\nclient.submit_order(event).await?;","handlingStrategy":"validation","validationCode":"if order.order_payload().is_none() && order.trigger_payload().is_none() && order.prior_exec_payload().is_none() {\n    return Err(\"cannot submit: no order/orderTrigger/orderPriorExecution payload\");\n}\nclient.submit_order(order).await?;","typeGuard":"fn has_submittable_payload(event: &OrderEvent) -> bool {\n    event.order.is_some() || event.order_trigger.is_some() || event.order_prior_execution.is_some()\n}","tryCatchPattern":"match client.submit_order(event).await {\n    Err(e) if e.to_string().contains(\"No order, orderTrigger\") => log::error!(\"event lacks order payload: {event:?}\"),\n    Err(e) => return Err(e),\n    Ok(r) => r,\n}","preventionTips":["Always construct order requests via the official OrderFactory rather than manual structs","Log the event payload variant at submit sites during development","Keep nautilus event types and adapter versions in sync"],"tags":["order-submission","missing-payload","kraken-futures","validation"],"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-14T05:17:10.506Z"}