nautechsystems/nautilus_trader · error
No venue config found for venue '{venue}' (required by instr
Error message
No venue config found for venue '{venue}' (required by instrument {instrument_id}) What it means
During backtest node configuration validation, every instrument referenced by a data config must belong to a venue that also has a venue config defined. This error is thrown when an instrument's venue is not present in the configured venue names, so the backtest engine cannot build a matching venue/matching-engine for it.
Source
Thrown at crates/backtest/src/node.rs:344
);
let venue_names: Vec<String> = config
.venues()
.iter()
.map(|v| v.name().to_string())
.collect();
for data_config in config.data() {
if let (Some(start), Some(end)) = (data_config.start_time(), data_config.end_time()) {
anyhow::ensure!(
start <= end,
"Data config start_time ({start}) must be <= end_time ({end})"
);
}
for instrument_id in data_config.get_instrument_ids()? {
let venue = instrument_id.venue.to_string();
anyhow::ensure!(
venue_names.contains(&venue),
"No venue config found for venue '{venue}' (required by instrument {instrument_id})"
);
}
}
for venue_config in config.venues() {
let needs_book_data = matches!(
venue_config.book_type(),
BookType::L2_MBP | BookType::L3_MBO
);
if needs_book_data {
let venue_name = venue_config.name().to_string();
let has_book_data = config.data().iter().any(|dc| {
let is_book_type = matches!(
dc.data_type(),
NautilusDataType::OrderBookDelta | NautilusDataType::OrderBookDepth10View on GitHub (pinned to 18893faf8b)
Solutions
- Add a venue config for the missing venue via BacktestNode.add_venue(...) before building the node.
- Check each instrument ID's venue suffix and correct typos so it matches a configured venue name.
- Remove data configs / instruments whose venues are not part of the backtest.
Example fix
// before
node.add_data(InstrumentId::from("AAPL.NASDAQ")); // no NASDAQ venue configured
// after
node.add_venue(Venue::from("NASDAQ"));
node.add_data(InstrumentId::from("AAPL.NASDAQ")); Defensive patterns
Strategy: validation
Validate before calling
# python side, before building the node
venue_names = {v.name for v in venue_configs}
for inst in instruments:
assert inst.venue.value in venue_names, f"venue {inst.venue.value} missing for {inst.id}"
Try / catch
try:
node = BacktestNode(config)
except ValueError as e:
if "No venue config found" in str(e):
# log venue names + instrument ids and abort config build
raise SystemExit(f"Backtest misconfigured: {e}")
raise
Prevention
- Build venue configs from the same source as instrument IDs (derive venues from instruments, not hand-written lists).
- Keep instrument ID venue suffixes consistent with a single shared venue naming constant.
- Validate all data configs and venue configs together in a small pre-check function before BacktestNode::new.
When it happens
Trigger: Constructing a BacktestNode via BacktestNode::new and calling add_data (or passing a data config whose get_instrument_ids() yields instruments) where an instrument's venue (e.g. 'SIM' in 'AAPL.NASDAQ') has no corresponding add_venue call.
Common situations: Typo in the venue suffix of an instrument ID (e.g. 'EUR/USD.SIM' vs venue 'SIMULATION'); adding market data for a venue that was never registered; loading instruments from a catalog for exchanges not configured in the node.
Understand the failure class
Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.
Related errors
- Venue '{venue_name}' has book_type {:?} but no order book da
- Invalid `NautilusDataType`: '{s}'
- BacktestEngineConfig.controller for importable controller '{
- Cannot add a multi-currency spot instrument {instrument_id}
- Spread instrument {symbol} not found
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/a6e1c7887a1139aa.
Report an issue: GitHub.