Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 1 3 7

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?

eikoneikon-data-apipython api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@Mohit.Rai

Hi,

Thank you for your participation in the forum.

Is the reply below satisfactory in answering your question?

If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

@Mohit.Rai

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvote
Accepted
22.1k 59 14 21

@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.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.