{"record":{"id":"f9cf41a9c55102a3","repo":"nautechsystems/nautilus_trader","slug":"failed-to-fetch-order-status-e","errorCode":null,"errorMessage":"Failed to fetch order status: {e}","messagePattern":"Failed to fetch order status: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/polymarket/src/execution/submitter.rs","lineNumber":422,"sourceCode":"    ) -> anyhow::Result<Option<PolymarketOpenOrder>> {\n        let http_client = self.http_client.clone();\n        let oid = order_id.to_string();\n\n        self.retry_manager\n            .invocation(\n                \"get_order\",\n                || {\n                    let http_client = http_client.clone();\n                    let oid = oid.clone();\n                    async move { http_client.get_order_optional(&oid).await }\n                },\n                |e| e.is_retryable(),\n                |e| Error::transport(e.to_string()),\n            )\n            .retry_delay(&Error::retry_after)\n            .execute()\n            .await\n            .map_err(|e| anyhow::anyhow!(\"Failed to fetch order status: {e}\"))\n    }\n\n    /// Prepares multiple limit order submissions in parallel.\n    pub(crate) async fn prepare_limit_order_submissions(\n        &self,\n        requests: &[LimitOrderSubmitRequest],\n    ) -> Vec<anyhow::Result<SignedLimitOrderSubmission>> {\n        let futures = requests\n            .iter()\n            .map(|request| self.prepare_limit_order_submission(request));\n        futures_util::future::join_all(futures).await\n    }\n\n    pub(crate) async fn prepare_limit_order_submission(\n        &self,\n        request: &LimitOrderSubmitRequest,\n    ) -> anyhow::Result<SignedLimitOrderSubmission> {\n        let order_type = PolymarketOrderType::try_from(request.time_in_force)","sourceCodeStart":404,"sourceCodeEnd":440,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/polymarket/src/execution/submitter.rs#L404-L440","documentation":"Raised in `OrderSubmitter::get_order` (used by `check_fok_status`) when the retrying HTTP request to fetch an order's status from the Polymarket CLOB fails after retries. The error is invoked right after order submission to determine whether a FOK order was matched; a failure here leaves the order status unknown. The wrapped transport error is embedded in the message.","triggerScenarios":"Polling order status immediately after submitting a FOK order while the API is degraded or rate-limited (429); network interruption; the order id not yet queryable or not found on the venue.","commonSituations":"Tight FOK status-check loops that hit Polymarket rate limits; brief API downtime; container DNS flakes; clock/timing races where the order id is not yet indexed.","solutions":["Retry with exponential backoff and honor any Retry-After header (the retry policy already keys off Error::retry_after)","Reduce status-poll frequency to stay under Polymarket rate limits","Confirm the venue_order_id/order id passed to get_order is correct","Inspect the inner error — if it is 404, the order id may be wrong or expired"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match get_order(venue_order_id).await {\n    Err(e) if e.is_retryable() => {\n        tokio::time::sleep(retry_after_or_default()).await;\n        // retry with cap\n    }\n    Err(e) => Err(anyhow!(\"order status unknown after retries: {e}\")),\n    Ok(status) => status,\n}","preventionTips":["Honor Retry-After headers and cap poll rate under venue limits","Add jitter to status polling loops","Treat persistent fetch failure as 'status unknown', not filled/canceled"],"tags":["network","http","polymarket","order-status","retry"],"backgroundTag":"http-request-failed","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"}