How to run EK.GET_DATA() for TR.Index_PE_RTRS 2001 to present?

How to run EK.GET_DATA() for TR.Index_PE_RTRS 2001 to present? Need your help in constructing the syntax using EIKON API.

Data type: TR.Index_PE_RTRS

Period: 2001 to present
RIC: <.HSCIIT>

Tagged:

Best Answer

  • nick.zincone
    Answer ✓

    Hi @carmela.alimario

    You need to define the Eikon Data Library before you can use it. Before you call ek.get_data(), you need to define and connect into Eikon.

    import eikon as ek

    ek.set_app_key('Your App Key')

    Refer to the learning material for this API. Specifically, look at step 4.

Answers

  • Information:

    Data type: TR.Index_PE_RTRS

    Period: 2001 to present
    RIC: <.HSCIIT>

  • Getting error in RW API - "NameError: name 'ek' is not defined"

    df, err = ek.get_data(

    instruments = ['.HSCIIT'],

    fields = ['TR.Index_PE_RTRS.date','TR.Index_PE_RTRS'],parameters={'SDate':'2001-01-01','EDate':'0d','Frq':'D'})


    display(df)