[Python API] get all listed markets

some equities (e.g. IBM) are listed in multiple market.

is there any way I can get the list of all market identification codes (MICs) where the instrument is listed?

Best Answer

  • @01197207-f3c7-4186-9d92-6d041562e076 on a second thought, that might be a more suitable way:

    rics = ek.get_symbology('US4592001014', from_symbol_type='ISIN', to_symbol_type='RIC', bestMatch=False)['RICs'].tolist()[0]
    equity_rics = list(filter(lambda ric:'^' not in ric, rics))
    df, e = ek.get_data(equity_rics, ['TR.ExchangeMarketIdCode'])

Answers

  • @01197207-f3c7-4186-9d92-6d041562e076 you can use the symbology api call in python to get a list of rics associated with a ticker. Something along these lines:

    all_rics = ek.get_symbology('IBM', bestMatch=False)['RICs'].tolist()[0]
    equity_rics = list(filter(lambda ric:'.' in ric, all_rics))
    df, e = ek.get_data(equity_rics, ['TR.ExchangeMarketIdCode'])