How do I convert bond CUSIP to ISIN?

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.


Best Answer

  • raksina.samasiri
    Answer ✓

    Hi @ulelectronic1 ,

    There's a convert symbology function provided, for example,

    1. Eikon Data API: Quick Start guides, Tutorials, Documentation
      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')
      1678784679308.png
    2. Refinitiv Data Library for Python: Quick Start guides, Tutorials, Documentation
      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
      1678784795876.png

    Hope this helps and please let me know in case you have any further question.

Answers

  • 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

    1678799532458.png