{"record":{"id":"9ae22774527a5ed6","repo":"nautechsystems/nautilus_trader","slug":"no-dataset-found-for-venue-venue","errorCode":null,"errorMessage":"No dataset found for venue: {venue}","messagePattern":"No dataset found for venue: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/databento/src/data.rs","lineNumber":260,"sourceCode":"        self.config.api_key()\n    }\n\n    /// Returns a masked version of the API key for logging purposes.\n    #[must_use]\n    pub fn api_key_masked(&self) -> String {\n        self.config.api_key_masked()\n    }\n\n    /// Gets the dataset for a given venue using the data loader.\n    ///\n    /// # Errors\n    ///\n    /// Returns an error if the venue-to-dataset mapping cannot be found.\n    fn get_dataset_for_venue(&self, venue: Venue) -> anyhow::Result<String> {\n        self.loader\n            .get_dataset_for_venue(&venue)\n            .map(ToString::to_string)\n            .ok_or_else(|| anyhow::anyhow!(\"No dataset found for venue: {venue}\"))\n    }\n\n    /// Gets or creates a feed handler for the specified dataset.\n    fn get_or_create_feed_handler(&self, dataset: &str) -> bool {\n        let mut channels = self.cmd_channels.lock();\n\n        if !channels.contains_key(dataset) {\n            log::debug!(\"Creating new feed handler for dataset: {dataset}\");\n            let cmd_tx = self.initialize_live_feed(dataset.to_string());\n            channels.insert(dataset.to_string(), cmd_tx);\n\n            log::debug!(\"Feed handler created for dataset: {dataset}, channel stored\");\n            return true;\n        }\n\n        false\n    }\n","sourceCodeStart":242,"sourceCodeEnd":278,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/databento/src/data.rs#L242-L278","documentation":"The Databento data client maps each trading venue to a Databento dataset via its configured loader. If the venue has no mapping entry, `get_dataset_for_venue` fails with this error before any subscription is attempted. The mapping typically comes from configuration or a defaults file.","triggerScenarios":"Calling subscribe_instrument, subscribe_quotes, subscribe_trades, subscribe_book_deltas, subscribe_instrument_status, or request_instruments with a Venue whose name has no entry in the venue-to-dataset mapping.","commonSituations":"Typos or casing mismatches in venue names (e.g. 'BINANCE' vs 'BINANCE.ROUTE'), using a venue not present in the defaults config, or failing to supply the venue-to-dataset mapping file/option at client construction.","solutions":["Add the venue-to-dataset mapping for the venue in the client's config/loader","Check venue name spelling and exact casing against the mapping","Verify the mapping file/defaults are actually loaded (path correct, parsed successfully)","Query the client with a known-mapped venue to confirm the loader is populated"],"exampleFix":"// before\nlet client = DatabentoDataClient::new(config, cache, clock); // no mappings\n// after\nlet mut config = config;\nconfig.dataset_venue_map = VenueDatasetMap::from_config(\"databento_venues.json\")?;\nlet client = DatabentoDataClient::new(config, cache, clock);","handlingStrategy":"validation","validationCode":"fn ensure_dataset_mapped(map: &VenueDatasetMap, venue: Venue) -> Result<(), String> {\n    map.get_dataset_for_venue(&venue)\n        .ok_or_else(|| format!(\"no Databento dataset configured for venue {venue}\"))\n}","typeGuard":null,"tryCatchPattern":"match get_dataset_for_venue(venue) {\n    Ok(dataset) => subscribe(dataset),\n    Err(e) if e.to_string().starts_with(\"No dataset found for venue\") => {\n        eprintln!(\"add a venue->dataset mapping for {venue}\");\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Validate all venues you plan to use against the mapping at startup","Use exact venue constants, not hand-typed strings","Ship a defaults config covering every venue in your deployment"],"tags":["databento","venue","dataset","configuration"],"backgroundTag":"missing-required-config-field","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}