Converting a list of tickers to RICs

Hi there

I try to convert a list to tickers (such as IBM, AAPL) to RICs, such that I can carry out later queries. I have ~ 4000 of such tickers, which include delisted ones (such as OB). It is not wise to check them manually one-by-one, therefore I am looking for built-in methods to do the conversion.

I've tried two methods: get_data() and get_symbology(). For each of the command I can pass the list of tickers in, and hopefully the return values would contain the corresponding RICs, if applicable.

The get_data() method didn't do a good job, for example, for the ticker 'CALX', it won't return the corresponding RIC (should be CALX.K).

For CALX, the get_symbology() didn't return me the RIC either, but it return a ISIN. I then can call get_symbology() again, using ISIN as lookup argument, to get me the CALX.K. Therefore, I can manage to covert tickers to RIC through ISIN.

So far it seems that get_symbology() would solve my problem, however, I found I still missed few ticker --> RIC conversion. For example, if I am looking to convert the ticker SIR (RIC = SIR.O, from desktop version), there is no anything else available from ek.get_symbology('SIR', from_symbol_type='ticker'), other than its own ticker. Therefore, my ISIN solution won't work either.

Can someone wade in this problem?

Thanks!

Best Answer

  • HI @renne.yao - you are getting this because there is a bestMatch parameter that is set to True by default. This is something that we will fix (add this on the function signature).

    However meanwhile you can do the following:

    ek.json_requests.send_json_request('SymbologySearch',{'symbols': ['CALX'], 'from': 'ticker', 'to': ['RIC'], 'bestMatchOnly': False})

    This will always return a list of matching RICs. The first item should show the best match. For example - for the above request you would get:

    {'mappedSymbols': [{'RICs': ['CALX.K', 'CALX.N', 'CALX.MW', 'CALX.ZY', 'CALX.Z', 'CALX.B', 'CALX.TH', 'CALX.DG', 'CALX.P', 'CALX.DY', 'CALX.C', 'CALX.PH', 'CALX.A', 'CALX.DF', 'CALX.BT1', 'CALX.NB', 'CALX.ITC', 'CALX.BAT', 'CALX.BYX', 'CALX.EI', 'CALX.W^E14'], 'bestMatch': {'error': 'No best match available'}, 'symbol': 'CALX'}]}

Answers