Skip to main content

ib_contract_to_instrument_id_raw

Function ib_contract_to_instrument_id_raw 

Source
pub fn ib_contract_to_instrument_id_raw(
    contract: &Contract,
    venue: Option<Venue>,
) -> Result<InstrumentId>
Expand description

Convert an IB Contract to an InstrumentId using raw symbology.

This implements IB_RAW symbology: preserves IB raw format with security type suffix. For example:

  • “AAPL=STK.SMART”
  • “EUR.USD=CASH.IDEALPRO”
  • “ESM23=FUT.GLOBEX”

§Arguments

  • contract - The IB contract to convert
  • venue - Optional venue override (defaults based on security type)

§Errors

Returns an error if the instrument ID cannot be constructed.