How can I view the currency of an instrument?

I would like to read out the currency for an instrument.


For this I use the following code:

import refinitiv.data as rd

rd.open_session()

df = rd.get_data(

universe = ['NESN.S'],

fields = ['CF_CURR']

)

display(df)

The result is not the currency but a number (for NESN.S -> 756). How do I get the currency 'CHF'?

currency.png


Is there another dictionary where I can change the number into a currency.

Tagged:

Best Answer

  • wasin.w
    wasin.w admin
    Answer ✓

    Hello @michael.mauchle

    I can get the currency as "CHF" using the Data API submodule of the Refinitiv Data Library for Python as follows:

    import refinitiv.data.eikon as ek
    ek.set_app_key('APP_KEY') #Codebook ek.set_app_key('DEFAULT_CODE_BOOK_APP_KEY')
    df, err = ek.get_data(['NESN.S'], [ 'CF_CURR'])
    df

    Result:

    result.png

    Please be informed that you can also submit a Product Enhancement Request on the Refinitiv Data Library for Python via Product Feedback -> "Share New Idea", providing all the pertaining details about this API behavior too.

Answers