{"record":{"id":"7ac9753df3574976","repo":"nautechsystems/nautilus_trader","slug":"no-order-found-for-client-order-id-cid","errorCode":null,"errorMessage":"No order found for client_order_id={cid}","messagePattern":"No order found for client_order_id=(.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"warning","filePath":"crates/adapters/coinbase/src/http/client.rs","lineNumber":1161,"sourceCode":"        venue_order_id: Option<VenueOrderId>,\n    ) -> anyhow::Result<OrderStatusReport> {\n        let venue_order_id = match (venue_order_id, client_order_id) {\n            (Some(vid), _) => vid,\n            (None, Some(cid)) => {\n                // Fall back to batched query when only the client order ID is known\n                let query = OrderListQuery {\n                    client_order_id_filter: Some(cid.as_str().to_string()),\n                    ..Default::default()\n                };\n                let orders = self\n                    .inner\n                    .fetch_all_orders(&query)\n                    .await\n                    .map_err(|e| anyhow::anyhow!(\"Failed to fetch orders: {e}\"))?;\n                let order = orders\n                    .into_iter()\n                    .next()\n                    .ok_or_else(|| anyhow::anyhow!(\"No order found for client_order_id={cid}\"))?;\n                let instrument = self.get_or_fetch_instrument(order.product_id).await?;\n                let ts_init = self.ts_now();\n                return parse_order_status_report(&order, &instrument, account_id, ts_init);\n            }\n            (None, None) => {\n                anyhow::bail!(\"Either client_order_id or venue_order_id is required\")\n            }\n        };\n\n        let json = self\n            .inner\n            .get_order(venue_order_id.as_str())\n            .await\n            .map_err(|e| anyhow::anyhow!(\"Failed to fetch order: {e}\"))?;\n        let response: OrderResponse =\n            serde_json::from_value(json).map_err(|e| anyhow::anyhow!(e))?;\n        let instrument = self\n            .get_or_fetch_instrument(response.order.product_id)","sourceCodeStart":1143,"sourceCodeEnd":1179,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/coinbase/src/http/client.rs#L1143-L1179","documentation":"Raised by request_order_status_report when a lookup by client_order_id returns an empty order list: Coinbase accepted the query but no matching order exists. This is an empty-result condition after a successful fetch, distinct from the 'Failed to fetch orders' HTTP error.","triggerScenarios":"Calling request_order_status_report(account_id, client_order_id, None) with a client_order_id Coinbase does not recognize: order never submitted, submitted via a different key/portfolio, truncated id, or order purged from history.","commonSituations":"Requesting reconciliation for orders placed before the adapter existed, using local client_order_ids that were never sent to the venue, wrong CDP portfolio/API key pair, or typos in the stored order id.","solutions":["Verify the client_order_id was actually submitted to Coinbase and matches exactly (including any adapter prefixes).","Confirm the API key targets the same CDP portfolio/keys the order was placed under.","Check the order exists in the Coinbase web UI under Advanced Trade orders.","Treat this as 'order unknown to venue' in reconciliation flows rather than retrying the query."],"exampleFix":"// before\nlet report = client.request_order_status_report(account_id, Some(cid.clone()), None).await?;\n// after (guard for unknown orders)\nmatch client.request_order_status_report(account_id, Some(cid.clone()), None).await {\n    Ok(r) => Ok(r),\n    Err(e) if e.to_string().contains(\"No order found\") => { tracing::warn!(\"unknown to venue: {cid}\"); Ok(None) }\n    Err(e) => Err(e),\n}","handlingStrategy":"fallback","validationCode":"// before querying, confirm the order was submitted via this adapter/portfolio:\nanyhow::ensure!(submitted_order_ids.contains(cid), \"order {cid} was never sent to Coinbase\");","typeGuard":null,"tryCatchPattern":"match client.request_order_status_report(account_id, Some(cid.clone()), None).await {\n    Ok(r) => Some(r),\n    Err(e) if e.to_string().contains(\"No order found\") => { warn!(\"order unknown to venue: {cid}\"); None }\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Track locally which client_order_ids were actually submitted to the venue.","Use one API key/portfolio consistently for submission and reconciliation.","Treat empty result as a reconciliation state, not a retryable failure."],"tags":["orders","not-found","coinbase","reconciliation"],"backgroundTag":"record-not-found","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}