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?
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.