Converting a list of tickers into RICs for regular data pulls, running into issue of get_symbology() converting some into the incorrect ticker (e.g. ADOC is converted to ADOC.PA instead of ADOC.O). Is there a way to avoid this without manually finding the exceptions and having to look up the correct RIC each time?
Instead of get_symbology method of Eikon Data APIs library, I suggest using RDP Library for search, lookups and symbology conversion. I sense that you're focused on US stocks and would like to eliminate all international matches when using a stock ticker. Here's an example using RDP Library that strictly interprets the input as a US stock ticker:
import refinitiv.dataplatform as rdp rdp.open_desktop_session('MY_APP_KEY') rdp.lookup(view = rdp.SearchViews.EquityQuotes, scope = 'USStockTicker', terms = 'MSFT,AAPL,GOOG,IBM,ADOC', select = 'RIC')
| RIC
AAPL | AAPL.OQ
ADOC | ADOC.OQ
GOOG. | GOOG.OQ
IBM. | IBM.N
MSFT. | MSFT.OQ
One ticker can be mapped to several RICs.
data = ek.get_symbology(["ADOC"], from_symbol_type="ticker", to_symbol_type="RIC", bestMatch=False, raw_output=True) data
When using the get_symbology in Eikon Data API, ADOC can be mapped to the following RICs.
{'mappedSymbols': [{'RICs': ['ADOC.PA', 'ADOC.O', 'ADOC.OQ', 'ADOC.PH', 'ADOC.B', 'ADOC.Z', 'ADOC.ZY', 'ADOC.DG', 'ADOC.DY', 'ADOC.PA1', 'ADOC.N', 'ADOC.A', 'ADOC.DF', 'ADOC.C', 'ADOC.MW', 'ADOC.P', 'ADOC.ARC', 'ADOC.NB', 'ADOC.ITC', 'ADOC.BAT', 'ADOC.BYX', 'ADOC.EI', 'ADOC.BT1', 'ADOC.LTS', 'ADOC.MEM', 'ADOC.MP', 'ADOCEUR.VIp^J18'], 'bestMatch': {'error': 'No best match available'}, 'symbol': 'ADOC'}]}
ADOC.O is also on the list.