{"record":{"id":"8f33ebb482daf975","repo":"nautechsystems/nautilus_trader","slug":"no-raw-symbol-found-for-instrument-id","errorCode":null,"errorMessage":"No raw symbol found for {instrument_id}","messagePattern":"No raw symbol found for (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/databento/src/symbology.rs","lineNumber":150,"sourceCode":"    } else if let Some(msg) = record.get::<dbn::Cmbp1Msg>() {\n        (msg.hd.instrument_id, msg.ts_recv)\n    } else if let Some(msg) = record.get::<dbn::CbboMsg>() {\n        (msg.hd.instrument_id, msg.ts_recv)\n    } else if let Some(msg) = record.get::<dbn::TbboMsg>() {\n        (msg.hd.instrument_id, msg.ts_recv)\n    } else {\n        anyhow::bail!(\"DBN message type is not currently supported\")\n    };\n\n    let duration = time::Duration::nanoseconds(nanoseconds as i64);\n    let datetime = time::OffsetDateTime::UNIX_EPOCH\n        .checked_add(duration)\n        .ok_or_else(|| anyhow::anyhow!(\"Timestamp overflow for record\"))?;\n    let date = datetime.date();\n    let symbol_map = metadata.symbol_map_for_date(date)?;\n    let raw_symbol = symbol_map\n        .get(instrument_id)\n        .ok_or_else(|| anyhow::anyhow!(\"No raw symbol found for {instrument_id}\"))?;\n\n    let symbol = Symbol::from_str_unchecked(raw_symbol);\n\n    Ok(InstrumentId::new(symbol, venue))\n}\n\n#[must_use]\npub fn infer_symbology_type(symbol: &str) -> SType {\n    if symbol.ends_with(\".FUT\") || symbol.ends_with(\".OPT\") {\n        return SType::Parent;\n    }\n\n    let parts: Vec<&str> = symbol.split('.').collect();\n    if parts.len() == 3 && parts[2].chars().all(|c| c.is_ascii_digit()) {\n        return SType::Continuous;\n    }\n\n    if symbol.chars().all(|c| c.is_ascii_digit()) {","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/databento/src/symbology.rs#L132-L168","documentation":"To map a record to a Nautilus symbol, the decoded Nautilus instrument ID (numeric/dynamic symbol like the raw DBN instrument_id) is looked up in the metadata's symbol map for the record's date. If the raw symbol for that instrument ID does not exist in the symbology map for that day, this error is thrown — the symbology metadata does not cover the instrument at that timestamp.","triggerScenarios":"Decoding records whose timestamp date lies outside the range covered by the metadata's symbol maps (metadata requested for a shorter date range than the data), or instruments absent from the dataset's symbology (e.g. instrument listed/delisted outside the metadata window, universe filtering, or stale/cached metadata from an earlier request).","commonSituations":"Requesting data and metadata with mismatched start/end dates; reusing a cached MetadataCache across days; GLBX.MDP3 data containing instruments that rolled in after the metadata snapshot; reading an old data file with newly fetched metadata.","solutions":["Re-request metadata with a start/end range that fully covers the data's timestamps (same range as the get_range call), then retry.","Re-download data and metadata together so their date ranges match.","Refresh any cached MetadataCache — don't reuse one across sessions or date ranges.","If the instrument legitimately has no symbology entry for that date, filter those records out before mapping."],"exampleFix":"// before\nlet data = client.get_range(dataset, symbols, \"glbx-0.1\", start, end).await?;\nlet meta = client.get_range(dataset, \"\", \"glbx-0.1\", end - 1.day, end).await?; // too narrow\n\n// after\nlet data = client.get_range(dataset, symbols, \"glbx-0.1\", start, end).await?;\nlet meta = client.get_range(dataset, \"\", \"glbx-0.1\", start, end).await?; // matches data range","handlingStrategy":"validation","validationCode":"// Rust\nlet date = offset_datetime_from_nanos(record.ts_event()).date();\nanyhow::ensure!(\n    metadata.covers_date(date),\n    \"symbol map missing for {date}; widen metadata date range\"\n);","typeGuard":null,"tryCatchPattern":"let id = match decode_nautilus_instrument_id(record, metadata, &pub_map, &sym_map) {\n    Ok(id) => id,\n    Err(e) if e.to_string().starts_with(\"No raw symbol found\") => {\n        log::warn!(\"no symbology for record on {date}; skipping\");\n        return Ok(None);\n    }\n    Err(e) => return Err(e.into()),\n};","preventionTips":["Request symbology metadata with the exact same start/end range as the data","Never reuse a MetadataCache across sessions or date ranges","Re-fetch data and metadata together after instrument rolls"],"tags":["databento","rust","symbology","symbol-map"],"backgroundTag":"record-not-found","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}