Skip to main content

extract_instrument_ids

Function extract_instrument_ids 

Source
pub fn extract_instrument_ids(
    value: &Bound<'_, PyAny>,
) -> PyResult<Vec<InstrumentId>>
Expand description

Extracts one instrument ID or a sequence into a normalized, non-empty list.

Duplicate IDs are removed in first-occurrence order.

ยงErrors

Returns an error if:

  • The value is not an instrument ID or a sequence of instrument IDs.
  • The sequence is empty.