{"record":{"id":"d16366abab7412fe","repo":"nautechsystems/nautilus_trader","slug":"lighter-account-id-issuer-does-not-match-config","errorCode":null,"errorMessage":"Lighter account ID issuer {} does not match configured venue {}","messagePattern":"Lighter account ID issuer (.+?) does not match configured venue (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/lighter/src/execution.rs","lineNumber":256,"sourceCode":"    /// but cannot submit transactions; the constructor returns an error if\n    /// supplied values are malformed.\n    ///\n    /// # Errors\n    ///\n    /// Returns an error if the HTTP client fails to initialize or if any\n    /// supplied credential value cannot be parsed.\n    pub fn new(\n        core: ExecutionClientCore,\n        config: LighterExecutionClientConfig,\n    ) -> anyhow::Result<Self> {\n        anyhow::ensure!(\n            core.venue == config.resolved_venue(),\n            \"Lighter execution core venue {} does not match configured venue {}\",\n            core.venue,\n            config.resolved_venue(),\n        );\n\n        anyhow::ensure!(\n            config.account_id.get_issuer() == core.venue,\n            \"Lighter account ID issuer {} does not match configured venue {}\",\n            config.account_id.get_issuer(),\n            core.venue,\n        );\n\n        let credential = Credential::resolve_for_deployment(\n            config.private_key.clone().map(SecretString::into_inner),\n            config.account_index,\n            config.api_key_index,\n            config.deployment,\n            config.environment,\n        )\n        .context(\"failed to resolve Lighter credentials\")?;\n\n        let registry = Arc::new(MarketRegistry::new_with_venue_and_settlement_currency(\n            core.venue,\n            config.settlement_currency(),","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/lighter/src/execution.rs#L238-L274","documentation":"The Lighter account_id in the config carries an issuer (venue) tag that must equal the configured venue. When the account ID was minted for a different venue than the execution client's venue, construction fails, since credentials from one venue deployment must not be used against another.","triggerScenarios":"Creating a LighterExecutionClient whose config.account_id.get_issuer() differs from the client's venue — e.g. an AccountId like LIGHTER-001 issued under a different venue string, or a copied config with a stale issuer.","commonSituations":"Reusing an AccountId/config across venue deployments or test vs. main environments; editing the venue field without regenerating the account ID; case-sensitive venue spelling differences.","solutions":["Regenerate or correct the account_id so its issuer matches the configured venue exactly.","Align the config venue field with the issuer embedded in the account ID.","Verify the AccountId string format (VENUE-NUMBER) and its venue portion for case/spelling.","Copy credentials per-environment instead of sharing configs across venues."],"exampleFix":"// before\nconfig.account_id = AccountId::from(\"OTHER-001\");\nconfig.venue = Venue::from(\"LIGHTER\");\n// after\nconfig.account_id = AccountId::from(\"LIGHTER-001\");\nconfig.venue = Venue::from(\"LIGHTER\");","handlingStrategy":"validation","validationCode":"if config.account_id.get_issuer() != config.resolved_venue() {\n    return Err(anyhow!(\"account_id issuer {} != venue {}\", config.account_id.get_issuer(), config.resolved_venue()));\n}","typeGuard":null,"tryCatchPattern":"match LighterExecutionClient::new(core, config) {\n    Err(e) if e.to_string().contains(\"account ID issuer\") => {\n        // regenerate/correct the account_id for this venue\n    }\n    r => r?,\n}","preventionTips":["Keep per-venue/per-environment credential configs.","Check the AccountId venue prefix when copying configs.","Regenerate account IDs when changing venue deployment."],"tags":["account-id","venue-mismatch","config","credentials"],"backgroundTag":"invalid-config-value","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"}