Securities' names

Hi, I am trying to retrieve the instrument name (e.g., IBM.N) of all public entities in a country (say, the USA, or Italy, or Germany, ..) using the Eikon package in python. At the moment I am using the get_data function with synatx = SCREEN(U(IN(Equity(active,public,primary))), IN(TR.ExchangeMarketIdCode,"<list of exchanges>"))'. However, I am not able to pull all the securities this way. Is there a more efficient method to do so?

Best Answer

  • raksina.samasiri
    Answer ✓

    Hi @sc11214 ,

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

    Below is an another example of the conversion from Eikon Excel formula to Python script

    I've got this Excel formula from Screener app

    =@TR(&quot;SCREEN(U(IN(Equity(active,public,primary))/*UNV:Public*/), IN(TR.ExchangeCountryCode,""BN"",""KH"",""ID"",""LA"",""MY"",""MM"",""PH"",""SG"",""TH""), CURN=USD)","TR.CommonName;TR.ExchangeCountry","curn=USD RH=In CH=Fd")

    which can be converted to this Python script

    syntax = "SCREEN(U(IN(Equity(active,public,primary))), IN(TR.ExchangeCountryCode,'BN','KH','ID','LA','MY','MM','PH','SG','TH'), CURN=USD)"
    fields = ["TR.CommonName","TR.ExchangeCountry"]

    df, err = ek.get_data(syntax, fields)
    df

    and here's the data returned

    1630420161889.png

    Hope this could help

Answers