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
22 3 3 5

Securities' names

Hi, I am trying to retrieve the instrument name (e.g., IBM.N) of all public entities in a country (say, the USA, or Italy, or Germany, ..) using the Eikon package in python. At the moment I am using the get_data function with synatx = SCREEN(U(IN(Equity(active,public,primary))), IN(TR.ExchangeMarketIdCode,"<list of exchanges>"))'. However, I am not able to pull all the securities this way. Is there a more efficient method to do so?

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

Upvote
Accepted
14.2k 30 5 10

Hi @sc11214 ,

You may check this article Find Your Right Companies with SCREENER | Eikon Data APIs(Python)

Below is an another example of the conversion from Eikon Excel formula to Python script

I've got this Excel formula from Screener app

=@TR("SCREEN(U(IN(Equity(active,public,primary))/*UNV:Public*/), IN(TR.ExchangeCountryCode,""BN"",""KH"",""ID"",""LA"",""MY"",""MM"",""PH"",""SG"",""TH""), CURN=USD)","TR.CommonName;TR.ExchangeCountry","curn=USD RH=In CH=Fd")

which can be converted to this Python script

syntax = "SCREEN(U(IN(Equity(active,public,primary))), IN(TR.ExchangeCountryCode,'BN','KH','ID','LA','MY','MM','PH','SG','TH'), CURN=USD)"
fields = ["TR.CommonName","TR.ExchangeCountry"]

df, err = ek.get_data(syntax, fields)
df

and here's the data returned

1630420161889.png

Hope this could help


1630420161889.png (28.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
5.7k 21 2 6

Hi @sc11214 ,


Have you had a read of Nick's article on the Search API?

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
22 3 3 5

Hi @raksina.samasiri this is very helpful thank you very much

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.

Hi @sc11214 ,

Thank you for your participation in the forum. We're happy to help you!

Speaking of which, Could you please click the 'Accept' text next to the answer reply? This will guide all community members who have a similar question.

Thanks,
AHS

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.