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
166 2 1 3

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

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apicompany
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

@Yufeng.Ling1

Hi,

Thank you for your participation in the forum.

Is the reply below satisfactory in answering your question?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Hi,

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
78.8k 250 52 74

@Yufeng.Ling1

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.

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.