{"record":{"id":"4bbe5aa659ac2300","repo":"nautechsystems/nautilus_trader","slug":"failed-to-resolve-ax-instrument-symbol-via-get","errorCode":null,"errorMessage":"Failed to resolve AX instrument {symbol} via GET /instrument: {e}","messagePattern":"Failed to resolve AX instrument (.+?) via GET /instrument: (.+?)","errorType":"http","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/architect_ax/src/http/client.rs","lineNumber":2383,"sourceCode":"                Err(e) => {\n                    log::warn!(\"Failed to parse position for {}: {e}\", position.symbol);\n                }\n            }\n        }\n\n        Ok(reports)\n    }\n\n    async fn resolve_report_instrument(&self, symbol: Ustr) -> anyhow::Result<InstrumentAny> {\n        if let Some(instrument) = self.get_instrument(&symbol) {\n            return Ok(instrument);\n        }\n\n        let instrument = self\n            .request_instrument(symbol, None, None)\n            .await\n            .map_err(|e| {\n                anyhow::anyhow!(\"Failed to resolve AX instrument {symbol} via GET /instrument: {e}\")\n            })?;\n        self.cache_instrument(instrument.clone());\n        Ok(instrument)\n    }\n\n    /// Cancels all open orders for an instrument.\n    ///\n    /// # Errors\n    ///\n    /// Returns an error if the request fails.\n    pub async fn cancel_all_orders(&self, instrument_id: InstrumentId) -> Result<(), AxHttpError> {\n        let request = CancelAllOrdersRequest::new().with_symbol(instrument_id.symbol.inner());\n        self.inner.cancel_all_orders(&request).await?;\n        Ok(())\n    }\n}\n","sourceCodeStart":2365,"sourceCodeEnd":2400,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/a4b06ed870971b5671d12754ea138a3ab99b1dec/crates/adapters/architect_ax/src/http/client.rs#L2365-L2400","documentation":"request_fill_reports resolves each fill's symbol by cache lookup, then a live GET /instrument; this error wraps the failure of that fetch. It means the fill's symbol was not in the instrument cache and the HTTP call failed — network/5xx, auth/scopes, a 404 for a delisted or unknown symbol, or the returned definition failing to parse.","triggerScenarios":"A fill arrives for a symbol the adapter never loaded (fresh client doing fills reconciliation before instrument loading); the API token lacks instrument-read scope; the symbol was delisted between execution and reconciliation; transient connectivity blip or 5xx on /instrument.","commonSituations":"Cold-starting the AX adapter and immediately requesting fill reports; reconciling historical fills for delisted contracts; testnet symbols not present on the prod endpoint; expired or rotated API credentials.","solutions":["Warm the instrument cache first: call the adapter's instrument loading (request_instruments / subscribe instruments) before requesting fills","Look the symbol up in the AX web UI — delisted or renamed symbols 404 and need manual handling","Verify API credentials, scopes, and network path to the /instrument endpoint","Retry once for transient 5xx/network errors before treating it as a data problem"],"exampleFix":"// before — fills first, cache cold\nlet reports = client.request_fill_reports(account_id, start, end).await?;\n// after — instruments first, then fills\nclient.request_instruments(None).await?;\nlet reports = client.request_fill_reports(account_id, start, end).await?;","handlingStrategy":"retry","validationCode":"// Warm the instrument cache before requesting fills so /instrument is rarely hit\nlet instruments = client.request_instruments(None).await?;\nlet known: HashSet<Ustr> = instruments.iter().map(|i| i.id().symbol.inner()).collect();\n// pre-check the fills window's symbols if you already know them; otherwise this at least\n// populates the cache that resolve_report_instrument consults first","typeGuard":null,"tryCatchPattern":"match client.request_fill_reports(account_id, start, end).await {\n    Ok(reports) => Ok(reports),\n    Err(e) if e.to_string().contains(\"Failed to resolve AX instrument\") => {\n        log::warn!(\"instrument fetch failed (network/scope/delisted?): {e}\");\n        tokio::time::sleep(Duration::from_secs(2)).await;\n        // one retry covers transient 5xx; persistent failure means bad symbol or credentials\n        client.request_fill_reports(account_id, start, end).await\n    }\n    Err(e) => Err(e),\n}","preventionTips":["Load instruments at adapter startup, before any fills or order reconciliation","Reconcile fills for delisted symbols manually — they 404 on /instrument and will always fail","Monitor credential expiry and scopes: instrument reads are the first calls to fail on auth problems"],"tags":["architect-ax","instrument","fills","http","resolution"],"backgroundTag":"instrument-resolution-failed","analyzedSha":"a4b06ed870971b5671d12754ea138a3ab99b1dec","analyzedAt":"2026-08-16T22:54:50.089Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}