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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 1 2

Screen to capture a list of tickers

Some of my Excel API queries involved fetching a list of tickers that are covered only by a certain broker, so I could get the EPS forecasts provided by that specific broker. Hence I constructed a screen query to get the Primary Tickers of that broker, and then ran a different query from that ticker list to get the data values.

My screening query looked something like this:

=TR("SCREEN(U(IN(Equity(active,public,primary))), avail(TR.EPSEstValue(Period=FY1,Brokers=US_2),TR.EPSEstValue(Period=FY1,Brokers=US_57030))>=-100)","TR.PrimaryRICCode", "SDate=0 EDate=0 Frq=d RH=IN")

The problem is that this query does not work in the Web API. Can you assist me to get it working?

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonsymbologyscreener
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.

@Wessel

This question was posted in Eikon Scripting APIs which is Python. However, the question is about Web API.

Could you please confirm the API that you are using? Is it App Studio - Web SDK (JET)?

It will be helpful if you can share the code that you are using in the Web API.

Upvotes
Accepted
4.3k 2 4 5

Following code should be the equivalent of your TR function in EXCEL:

>>> rics = 'SCREEN(U(IN(Equity(active,public,primary))), avail(TR.EPSEstValue(Period=FY1,Brokers=US_2),TR.EPSEstValue(Period=FY1,Brokers=US_57030))>=-100)'
>>> params = {'SDate':0, 'EDate':0, 'Frq':'d'}
>>> data, error = ek.get_data(rics, fields=['TR.PrimaryRICCode'], parameters=params)
>>> data
      Instrument Primary RIC
0        AMED.OQ      AMED.O
1        AAPL.OQ      AAPL.O
2          AAP.N         AAP
3        ABAX.OQ      ABAX.O
...          ...         ...
2707      CTEC.L      CTEC.L
2708    AALR3.SA    AALR3.SA
2709     DNAO.HE     DNAO.HE
2710     PNBH.NS     PNBH.NS

[2737 rows x 2 columns]
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.

Upvotes
3 0 1 2

Apologies, I should have said Eikon Scripting API. I'm experiencing the problem in Python.

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