nautechsystems/nautilus_trader · error
Lighter execution core venue {} does not match configured ve
Error message
Lighter execution core venue {} does not match configured venue {} What it means
At LighterExecutionClient::new, the venue recorded on the ExecutionClientCore must equal the venue resolved from the Lighter execution config. A mismatch means the execution core was built for a different venue than the config implies, so the client refuses to construct to avoid routing orders to the wrong venue.
Source
Thrown at crates/adapters/lighter/src/execution.rs:249
}
/// Creates a new [`LighterExecutionClient`] instance.
///
/// Resolves credentials from `config` or the matching environment
/// variables (see [`crate::common::credential`]). Missing credentials
/// degrade to an unauthenticated client that can bootstrap instruments
/// 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,View on GitHub (pinned to 18893faf8b)
Solutions
- Make the ExecutionClientCore venue match the venue in LighterExecutionClientConfig (exact string).
- Check config.resolved_venue() logic and any venue default that may differ from your core's venue.
- Build the core via the adapter's own factory so venue is derived from the same config.
- Log/print both venues to see the mismatch spelled out in the error text.
Example fix
// before
let core = ExecutionClientCore::new(Venue::from("LIGHTER-X"), ...);
let client = LighterExecutionClient::new(core, config)?;
// after
let core = ExecutionClientCore::new(config.resolved_venue(), ...);
let client = LighterExecutionClient::new(core, config)?; Defensive patterns
Strategy: validation
Validate before calling
if core.venue != config.resolved_venue() {
return Err(anyhow!("core venue {} != config venue {}", core.venue, config.resolved_venue()));
} Try / catch
match LighterExecutionClient::new(core, config) {
Err(e) if e.to_string().contains("execution core venue") => {
// rebuild core from the same config
}
r => r?,
} Prevention
- Derive the execution core from the same config object.
- Never hand-set the core venue independently of config.
- Log both venue values when assembling clients.
When it happens
Trigger: Constructing a LighterExecutionClient with a core whose venue field differs from config.resolved_venue() — e.g. venue name mismatch between client builder and config (different spelling, case, or default venue).
Common situations: Hand-assembling the execution core with a generic/default venue; config venue field edited after the core was built; copying a config between venues.
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
- Invalid config type for AxExecutionClientFactory. Expected A
- request_rate_per_second must be greater than zero
- order_request_rate_per_second must be greater than zero
- heartbeat_secs must be positive when set
- heartbeat_timeout_secs must cover at least two server heartb
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/b1d402999323cbe3.
Report an issue: GitHub.