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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 0 3

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 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
1.7k 2 4 7

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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea