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
1 3 4 5

How to use the Eikon API to get the data of the red box field in the screenshot below and its historical data?

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-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.

Hello @yuyang

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?


If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,


AHS


@yuyang

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

Thanks,

-AHS

1 Answer

· Write an Answer
Upvotes
Accepted
10.2k 18 6 9

@yuyang Please try:

df,err = ek.get_data(["AAPL.O"],["TR.H.PE/PERCENT_CHG(TR.F.EPSDilExclExOrditemsComTot(Period=LTM,Methodology=InterimSum),wsize=-1)","TR.F.PriceToEPSDilExclExOrdComTot(Period=FY-1)/PERCENT_CHG(TR.F.EPSDilExclExOrditemsComTot(Period=FY-1),wsize=-1)","TR.F.PriceToEPSDilExclExOrdComTot(Period=FY0)/PERCENT_CHG(TR.F.EPSDilExclExOrditemsComTot(Period=FY0),wsize=-1)","TR.H.PriceToSalesPerShare","TR.F.PriceToTotRevPerShr(Period=FY-1)","TR.F.PriceToTotRevPerShr(Period=FY0)","TR.H.PriceToCFPerShare","TR.F.PriceToNetCFOpPerShr(Period=FY-1)","TR.F.PriceToNetCFOpPerShr(Period=FY0)"])

df.transpose()

I hope this can help. In future you can just hover over the question mark icon next to the field you are interested in and it will give you the formula in excel but you can use the fieldname in python as well by inserting them into the above structure.


1621895997550.png (131.5 KiB)
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.