How to show date in get_data() method?

I have the following code:

df, err = ek.get_data(
    instruments = ['ONGZ2'],
    fields = [
        'TR.CLOSEPRICE(Frq=D,SDate=2021-07-01,EDate=2022-07-20)',
        'TR.OPENINTEREST(Frq=D,SDate=2021-07-01,EDate=2022-07-20)'
    ]
)
display(df)


This plots the data range specified but doesn't show the respective date. How can I get the date data as well here?

Best Answer

  • Gurpreet
    Answer ✓

    @Mohit.Rai,

    See my answer to your previous question. In the Data Item Browser within Eikon or Refinitiv Workspace, there is an output type you can select.

    For e.g.

    TR.CLOSEPRICE.timestamp

    will provide you with the close time.