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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
7 2 0 4

Problem with SCREEN function in web scripting API

I have screen that works in Excel API, but not in Web scripting API (Python). What do I need to change? "SCREEN(U(IN(Equity(active,public,primary,countryprimaryquote))), IN(TR.ExchangeCountryCode,""ZA"")),CFRJ.J"

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.

Upvote
Accepted
4.3k 2 4 5

You need to request at least one field (ex: TR.PriceClose).

Following code is running well:

>>> ek.get_data("SCREEN(U(IN(Equity(active,public,primary,countryprimaryquote))), IN(TR.ExchangeCountryCode,'ZA')),CFRJ.J","TR.PriceClose")
(     Instrument  Price Close
0        CCOJ.J       4737.0
1       RACPp.J       2150.0
2        LHCJ.J       2562.0
3        RSGJ.J        188.0
..          ...          ...
409   NFTRCIJ.J       2286.0
410   NFGOVIJ.J       5540.0
411   PREFTXJ.J        844.0
412      CFRJ.J      12115.0
[413 rows x 2 columns], None)
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
4.3k 2 4 5

@Johann-Lourens, a workaround if you just want to retrieve RIC list, you can also request a not existing field (much faster to execute):

>>> data,err=ek.get_data("SCREEN(U(IN(Equity(active,public,primary,countryprimaryquote))), IN(TR.ExchangeCountryCode,'ZA')),CFRJ.J","Instrument")
>>> data
     Instrument  INSTRUMENT
0        CCOJ.J         NaN
1       RACPp.J         NaN
2        LHCJ.J         NaN
3        RSGJ.J         NaN
..          ...         ...
409   NFTRCIJ.J         NaN
410   NFGOVIJ.J         NaN
411   PREFTXJ.J         NaN
412      CFRJ.J         NaN
[413 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.

Click below to post an Idea Post Idea