Skip to main content

map_instrument_info

Function map_instrument_info 

Source
pub fn map_instrument_info(
    info: &InstrumentInfo,
    class_code: &str,
) -> Instrument
Expand description

Maps the directory record of an instrument, for the board class_code.

  • Name: displayName, else shortName, else the ticker.
  • Kind: from the BCS type text (contains STOCK, BOND, FUTURE, OPTION, ETF, FUND, CURRENCY), anything else is Other.
  • Currency: the trading currency, RUB when the record has none (an assumption).
  • Exchange: the exchange of the board with this class code, MOEX when the board is not listed (an assumption).