Is it possible to download events info using Eikon API on an exchange and event type basis instread

Is it possible to download events info using Eikon API on an exchange and event type basis instead of for a single company?

Best Answer

  • raksina.samasiri
    Answer ✓

    hi @KennethCedric.Gonzales ,

    You may consider using a formula exported from the SCREENER app to retrieve the company list in each exchange then use Eikon get_data function to retrieve event of these company, then filter an event type in the output dataframe with python code, for example

    1. Use the SCREENER app to retrieve a list of company with the country of exchange is the Philippines (for more detail, please check article Find Your Right Companies with SCREENER | Eikon Data APIs(Python))
      1650623514720.png
      df, err = ek.get_data('SCREEN(U(IN(Equity(active,public,primary))), IN(TR.ExchangeCountryCode,"PH"), CURN=USD)'
                           ,['TR.CommonName','TR.ExchangeCountry'])
      df
      1650623574111.png
    2. Put the RICs list into a python list
      rics_list = df['Instrument'].tolist()
    3. retrieve events of these companies using the code below
      event_df, err = ek.get_data(rics_list
      ,['TR.CommonName','TR.EventStartDate','TR.EventType','TR.EventTitle'])
      event_df

    Please let me know in case you have any further questions.

Answers