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

Best Answer

  • raksina.samasiri
    Answer ✓

    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