Is it possible to search for all Equities listed on a particular exchange using the Eikon.get_dat...

Is it possible to search for all Equities listed on a particular exchange using the Eikon.get_data() function?

Best Answer

  • Gurpreet
    Gurpreet admin
    Answer ✓

    Hi @Excel Benedict.Cruz you can use a screener to form the basis of your query to get all the instruments. See Excel Screener for help on screener filters.

    For e.g. to get all the instruments listed on NYSE:

    >>> df, err = ek.get_data(instruments = "SCREEN(U(IN(Equity(active,public,primary))), IN(TR.ExchangeMarketIdCode,""XNYS""), CURN=USD)", fields = ['TR.CommonName', 'TR.ExchangeName'])

    >>> df.head()
      Instrument            Company Common Name                  Exchange Name
    0 FN.N Fabrinet NEW YORK STOCK EXCHANGE, INC.
    1 GCAP.N GAIN Capital Holdings Inc NEW YORK STOCK EXCHANGE, INC.
    2 HPP.N Hudson Pacific Properties Inc NEW YORK STOCK EXCHANGE, INC.
    3 OAS.N Oasis Petroleum Inc NEW YORK STOCK EXCHANGE, INC.
    4 ENV.N Envestnet Inc NEW YORK STOCK EXCHANGE, INC.