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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
27 2 1 7

How to get the Analyst detail data of stock?

Hi:

I want to use the api to get analyst detail data for stock , for example like the excel to get

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
a.png (347.2 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.

1 Answer

Upvotes
Accepted
3.8k 4 4 6

Hi @andy.ej

It looks that your example is taken from the Excel templates library - "Analyst Detail.xlsx". This is a good start to see what data can be retrieved. Of course you can also use a Build Formula tool in Excel to find the data you are looking for and then that formula transform into an API request.
The example =TR() formula used in that specific Eikon Excel, cell C31 (removed cell referencing):

=TR("TRI.TO","TR.EPSEstValue.analystname;TR.EPSEstValue();TR.EPSEstValue.date;TR.EPSEstValue(OutputOptions=Prev).analystname;TR.EPSEstValue(OutputOptions=Prev);TR.EPSEstValue(OutputOptions=Prev).date","Period=FY1 Curn=CAD NULL='-' Sort:asc Rh:BrokerName") 

can be converted to a python syntax

df, err = ek.get_data('TRI.TO', ['TR.EPSEstValue.brokername','TR.EPSEstValue.analystname','TR.EPSEstValue()','TR.EPSEstValue.date','TR.EPSEstValue(OutputOptions=Prev).analystname','TR.EPSEstValue(OutputOptions=Prev)','TR.EPSEstValue(OutputOptions=Prev).date'],{'Period':'FY1', 'Curn':'CAD','NULL':'-' })
df

Here is a good tutorial that will help you in understanding how to use python library data to access that data.

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.

Thank you ,

How get the daily data ,like use parameter => 'Frq':'D'

@andy.ej same way you use any parameter, in the param dictionary. For example, from the code above:

{'Period':'FY1', 'Curn':'CAD','NULL':'-', 'Frq':D }
Click below to post an Idea Post Idea