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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 1 0 0

Screening RICs with company names in R and Excel API

Hello, how do I screen RICs from a list of company in R or Excel? In R, it works well with one company name, but how to extend the query to 10,000 company names, for instance?

get_data(instruments = 'SCREEN(U(IN(Private(OrgType(COM,UNK,MKP)))),Contains(TR.CommonName,"AMNS Luxembourg Holding SA"))',fields=list("TR.CommonName"),debug =TRUE)

eikoneikon-data-apipythonworkspaceworkspace-data-apirefinitiv-dataplatform-eikoneikon-com-apiscreening-apir
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.

Upvotes
Accepted
18.1k 21 12 20

Hi @asantos2

You can use OR operator on SCREENER syntax.


This is an example in Python: (For R you have to test it)


I do not know the maximum number of contain supported by SCREENER.

But I do not think that it can support all 10000 name at once.


ahs1.png (92.3 KiB)
ahs2.png (22.5 KiB)
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.

Upvotes
1 1 0 0

Many thanks for your prompt response! However, how can I make a reference to a list of company names in Excel cells or a dataframe in R or Python instead of adding the term or Contains(TR.CommonName, "Company Name") in the query?

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.

Upvotes
18.1k 21 12 20

Hi @asantos2

You can use SCREENER app to define a syntax.

https://developers.refinitiv.com/article/find-your-right-companies-screener-eikon-data-apispython


Then if it is in excel, you can list the company in your excel sheet.

And the formula can refer to your cell value in Excel.


In R or in Python, you can store the value in variables and when you pass the screener syntax to API call, you can refer to the variable value.


ahs1.png (25.5 KiB)
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.

Upvotes
1 1 0 0

Many thanks. It works well in Python. I have also found out that you can download RICs in Excel with TR("SCREEN(U(IN(Private(OrgType(COM, UNK, MKP)))), Contains(TR.CommonName,'"&D3&"'))","TR.CommonName","RH=In TRANSPOSE:YES") and no double quotes in the company name in cell D3.

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.