Hi, I have a list of bond 8-digit CUSIP that I would like to acquire a historical rating for. But using CODECR, it seems that I need 12-digit ISIN. Is there a clever way to convert CUSIP to a list of ISIN? Thank you in advance.
Hi, I have a list of bond 8-digit CUSIP that I would like to acquire a historical rating for. But using CODECR, it seems that I need 12-digit ISIN. Is there a clever way to convert CUSIP to a list of ISIN? Thank you in advance.
Hi @ulelectronic1 ,
There's a convert symbology function provided, for example,
import refinitiv.data.eikon as ek ek.set_app_key('DEFAULT_CODE_BOOK_APP_KEY') ek.get_symbology( ['594918104', '02079K107', '459200101'], from_symbol_type='CUSIP', to_symbol_type='ISIN')
import refinitiv.data as rd from refinitiv.data.content import symbol_conversion rd.open_session() response = symbol_conversion.Definition( symbols=['594918104', '02079K107', '459200101'], from_symbol_type=symbol_conversion.SymbolTypes.CUSIP, to_symbol_types=[ symbol_conversion.SymbolTypes.ISIN ], ).get_data() response.data.df
Hope this helps and please let me know in case you have any further question.
I'd like to add that some fields can be retrieved using CUSIP code, for example the two instruments in the code below is as of Microsoft and some data is available using CUSIP, some doesn't.
df, err = ek.get_data(instruments = ['594918104','MSFT.O'], fields = ['CF_BID', 'CF_ASK', 'TR.Revenue','TR.GrossProfit', 'TR.EV','TR.EVToSales'], parameters = {'SDate': '0CY', 'Curn': 'CAD'}) df