Skip to main content

decode_nautilus_instrument_id

Function decode_nautilus_instrument_id 

Source
pub fn decode_nautilus_instrument_id(
    record: &RecordRef<'_>,
    metadata: &mut MetadataCache,
    publisher_venue_map: &IndexMap<PublisherId, Venue>,
    symbol_venue_map: &AHashMap<Symbol, Venue>,
    futures_year_digits: FuturesYearDigits,
    share_class_space: bool,
    futures_symbols: &AHashMap<(PublisherId, u32, Date), Symbol>,
    requested_symbols: Option<&AHashSet<Symbol>>,
) -> Result<InstrumentId>
Expand description

Decodes a Databento record into a Nautilus InstrumentId.

Some restricts year hints to the request set; an empty set disables hints. None uses hints from shared venue mappings.

ยงErrors

Returns an error if:

  • The publisher cannot be extracted from the record.
  • The publisher ID is not found in the venue map.
  • The underlying instrument ID mapping fails.