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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 1 1

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-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
icon clock
10 |1500

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

1 Answer

Upvotes
Accepted
6.7k 8 6 7

@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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea