pub fn parse_spread_instrument_id(
instrument_id: InstrumentId,
leg_contract_details: &[(&ContractDetails, i32)],
timestamp_ns: Option<UnixNanos>,
) -> Result<OptionSpread>Expand description
Parse a spread instrument ID into an OptionSpread instrument.
This implements the same logic as Python’s parse_spread_instrument_id.
Uses contract details from the first leg to determine spread properties.
§Arguments
instrument_id- The spread instrument IDleg_contract_details- Vector of (contract_details, ratio) tuplestimestamp_ns- Optional timestamp (uses current time if None)
§Errors
Returns an error if parsing fails.