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

  1. Regenerate or correct the account_id so its issuer matches the configured venue exactly.
  2. Align the config venue field with the issuer embedded in the account ID.
  3. Verify the AccountId string format (VENUE-NUMBER) and its venue portion for case/spelling.
  4. 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

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


AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08). Data as JSON: /api/errors/d16366abab7412fe. Report an issue: GitHub.