Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
42 9 6 13

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-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apisymbologyfilter
icon clock
10 |1500

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

1 Answer

· Write an Answer
Upvotes
Accepted
39.4k 77 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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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