nautechsystems/nautilus_trader · error
Lighter account ID issuer {} does not match configured venue
Error message
Lighter account ID issuer {} does not match configured venue {} What it means
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.
Source
Thrown at crates/adapters/lighter/src/execution.rs:256
/// but cannot submit transactions; the constructor returns an error if
/// supplied values are malformed.
///
/// # Errors
///
/// Returns an error if the HTTP client fails to initialize or if any
/// supplied credential value cannot be parsed.
pub fn new(
core: ExecutionClientCore,
config: LighterExecutionClientConfig,
) -> anyhow::Result<Self> {
anyhow::ensure!(
core.venue == config.resolved_venue(),
"Lighter execution core venue {} does not match configured venue {}",
core.venue,
config.resolved_venue(),
);
anyhow::ensure!(
config.account_id.get_issuer() == core.venue,
"Lighter account ID issuer {} does not match configured venue {}",
config.account_id.get_issuer(),
core.venue,
);
let credential = Credential::resolve_for_deployment(
config.private_key.clone().map(SecretString::into_inner),
config.account_index,
config.api_key_index,
config.deployment,
config.environment,
)
.context("failed to resolve Lighter credentials")?;
let registry = Arc::new(MarketRegistry::new_with_venue_and_settlement_currency(
core.venue,
config.settlement_currency(),View on GitHub (pinned to 18893faf8b)
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.
Example fix
// before
config.account_id = AccountId::from("OTHER-001");
config.venue = Venue::from("LIGHTER");
// after
config.account_id = AccountId::from("LIGHTER-001");
config.venue = Venue::from("LIGHTER"); Defensive patterns
Strategy: validation
Validate before calling
if config.account_id.get_issuer() != config.resolved_venue() {
return Err(anyhow!("account_id issuer {} != venue {}", config.account_id.get_issuer(), config.resolved_venue()));
} Try / catch
match LighterExecutionClient::new(core, config) {
Err(e) if e.to_string().contains("account ID issuer") => {
// regenerate/correct the account_id for this venue
}
r => r?,
} Prevention
- Keep per-venue/per-environment credential configs.
- Check the AccountId venue prefix when copying configs.
- Regenerate account IDs when changing venue deployment.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- Missing Betfair credentials in config and environment
- Invalid Betfair credentials: username provided but password
- Invalid Betfair credentials: password or app key provided bu
- Binance Spot market data mode SBE requires Ed25519 API crede
- BitMEX execution client requires API key and secret
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/d16366abab7412fe.
Report an issue: GitHub.