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
5 2 2 5

How can I find all listed companies given “Country of Domicile” or "the Exchange name or code"

Dear Sir/Madam,

I am using Eikon with Datastream for Office.

Q1) In Eikon’s Python API/Datastream, how can I find ALL (both alive and dead) listed companies’ RIC or PermID given the “Country of Domicile”?

Q2) In Eikon’s Python API/Datastream, how can I find ALL (both alive and dead) listed companies’ RIC or PermID given "the Exchange name or code"?

Best Regards,
Gary

eikon-data-apidatastream-for-office
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.

1 Answer

· Write an Answer
Upvotes
Accepted
14.2k 30 5 10

Hi @Gary C ,

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

For example, in case I'd like to get listed companies' RIC that has Country of Headquarters as Thailand, in Screener app,

  1. Tick both Active and Inactive in Include: section
  2. add filter Country of Headquarters to include Thailand
  3. Click the excel button > Export all as Formulas1638864118640.png
  4. the excel file with formula below is downloaded
    =@TR("SCREEN(U(IN(Equity(active or inactive,public,primary))/*UNV:Public*/), IN(TR.HQCountryCode,""TH""), CURN=USD)","TR.CommonName;TR.HeadquartersCountry","curn=USD RH=In CH=Fd")
  5. the formula can be converted to python code for Eikon Data API as
    df, err = ek.get_data('SCREEN(U(IN(Equity(active or inactive,public,primary))/*UNV:Public*/), IN(TR.HQCountryCode,"TH"), CURN=USD)'
                          ,['TR.CommonName','TR.HeadquartersCountry'])
    df
    1638864410937.png

For Question 2, filtering by the exchange name or code, you can adjust filter to Exchange Name include the exchange you're interested.

Hope this could help


1638864118640.png (135.5 KiB)
1638864410937.png (24.8 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.