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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
40 5 5 11

How do I add additional criteria when retrieving RIC codes to a ‘screener_exp’ statement?

In answer to my question ‘How do I retrieve RIC codes of stock symbols for a country, e.g. Canada?’ jirapongse.phuriphanvichai showed me some very useful snipper code such as

screener_exp = 'SCREEN(U(IN(Equity(active,public,primary))/*UNV:Public*/), IN(TR.ExchangeCountryCode,"CA"))' companies_data, err = ek.get_data(instruments=[screener_exp], fields=['TR.RIC']) companies_data

Now I would like to add additional criteria to this query, such as ‘Company Market Cap > 10000000 USD’ and ‘Average Daily Value Traded > 5000000 USD’?

How should I do this using the Python API?

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonsymbologyfilter
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
39.2k 75 11 27

You can use the Screener app in Eikon Excel (click on the Screener button in Thomson Reuters ribbon in Excel), which provides GUI helper to create screener expressions. At the end of the wizard you will have =TR function inserted into Excel worksheet and the first argument will start with "SCREEN(". You can copy & paste this expression string into your Python code and use it in get_data method. Please note that the Screener capability in Eikon Data APIs is not yet officially supported. Some users have previously reported that certain expressions work in Excel, but not in Eikon Data APIs.

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