{"record":{"id":"a60c3bafebed5675","repo":"nautechsystems/nautilus_trader","slug":"timeout-waiting-for-account-account-id-to-be-reg-a60c3b","errorCode":null,"errorMessage":"Timeout waiting for account {account_id} to be registered after {timeout_secs}s","messagePattern":"Timeout waiting for account (.+?) to be registered after (.+?)s","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/coinbase/src/execution.rs","lineNumber":328,"sourceCode":"        if self.core.cache().account(&account_id).is_some() {\n            log::info!(\"Account {account_id} registered\");\n            return Ok(());\n        }\n\n        let start = Instant::now();\n        let timeout = Duration::from_secs_f64(timeout_secs);\n        let interval = Duration::from_millis(10);\n\n        loop {\n            tokio::time::sleep(interval).await;\n\n            if self.core.cache().account(&account_id).is_some() {\n                log::info!(\"Account {account_id} registered\");\n                return Ok(());\n            }\n\n            if start.elapsed() >= timeout {\n                anyhow::bail!(\n                    \"Timeout waiting for account {account_id} to be registered after {timeout_secs}s\"\n                );\n            }\n        }\n    }\n}\n\nfn unix_nanos_to_utc(ts: UnixNanos) -> jiff::Timestamp {\n    ts.to_datetime_utc()\n}\n\n#[async_trait(?Send)]\nimpl ExecutionClient for CoinbaseExecutionClient {\n    fn is_connected(&self) -> bool {\n        self.core.is_connected()\n    }\n\n    fn client_id(&self) -> ClientId {","sourceCodeStart":310,"sourceCodeEnd":346,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/coinbase/src/execution.rs#L310-L346","documentation":"After connecting, await_account_registered polls the cache for the client's AccountId, expecting the account state to arrive via the WS/REST account stream within timeout_secs. If the account never appears, connect fails with this timeout, indicating the venue did not report the account (or it was filtered out).","triggerScenarios":"await_account_registered (called from connect) elapses its full timeout without cache().account(&account_id) returning Some — e.g. no account messages received because credentials lack account scope, wrong account configured, or WS connected but no snapshot delivered.","commonSituations":"API key without read scope on the trading account; connecting to the wrong environment (prod vs sandbox) so the account never publishes; slow network exceeding the fixed timeout; account_type mismatch so the expected account_id differs from the venue's.","solutions":["Verify API key scopes include account read access for the trading account","Confirm the configured account/environment matches where the key is valid (sandbox vs production)","Increase the account-registration timeout in the client config if the venue is slow","Check logs for incoming account/balance messages; if none, the key or account_id is wrong"],"exampleFix":"// before\nlet config = CoinbaseExecClientConfig { timeout_secs: 5, .. }; // too short\n\n// after\nlet config = CoinbaseExecClientConfig { timeout_secs: 30, .. };","handlingStrategy":"retry","validationCode":"// check scopes/permissions on the key before connect\nif !api_key.scopes.contains(\"view\") {\n    return Err(anyhow!(\"API key lacks account read scope\"));\n}","typeGuard":null,"tryCatchPattern":"match client.connect().await {\n    Err(e) if e.to_string().contains(\"Timeout waiting for account\") => {\n        tokio::time::sleep(Duration::from_secs(5)).await;\n        client.connect().await?; // bounded retry\n    }\n    other => other?,\n}","preventionTips":["Confirm the API key has account read permissions for the exact account","Match sandbox/prod environment to the key's origin","Raise the account-registration timeout on slow networks","Verify the configured account_type maps to the venue account that publishes state"],"tags":["timeout","account","execution-client","rust"],"backgroundTag":"request-timeout","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"}