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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 1 0 1

Is it possible to find the RIC of certain company with Eikon Data API if I only have company name in hand?

eikoneikon-data-apipythonworkspaceworkspace-data-apirefinitiv-dataplatform-eikoncompany
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.

Thanks. Jirapongse.


I tried your way and find it works. But what if I need to apply multiple criteria to narrow down searching results? I tried to right the function this way:

df, err = ek.get_data(['SCREEN(U(IN(Equity(active,public,private))),(Contains(TR.CommonName,"machinary") AND Contains(TR.CommonName,"China"))'], ['TR.CommonName','OAPermID'])


but there is no result as it is in Eikon Excel. Can you check where is the error?

You missed the closing parenthesis for the SCREEN.

df, err = ek.get_data(['SCREEN(U(IN(Equity(active,public,private))),(Contains(TR.CommonName,"machinary") AND Contains(TR.CommonName,"China")))'], ['TR.CommonName','OAPermID'])

Thanks for reminding me my mistake.

I tested your code with coming result that only companies with key word "machinary" but no "China" in name are found. Later on, I found that there are no company meets the criteria of containing both key words "machinary" and "China" in name.

So, I'm wondering what is the logical of “condition A and condition B” . In general, any condition=false will result in logical false, so that the screening result shall be none. Am I right?

Is this a possible bug?

capture.png (31.8 KiB)
Show more comments

1 Answer

Upvotes
Accepted
45.2k 103 43 60

@Yufeng.Ling

You can use a screener to find RICs with the company name.

df, err = ek.get_data(['SCREEN(U(IN(Equity(active,public,primary))),Contains(TR.CommonName,"Machine"))'], ['TR.CommonName']) 
df

The above code returns RICs that the common name contains "Machine".

You can use the Eikon Excel to create the screener formula and then use it with the get_data method.


1576132152466.png (58.2 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.