Can I use the screener in the R eikon API?

Try the following formula, it cannot recognize the instruments.

result9<-get_data(instruments='SCREEN(U(IN(Equity(active,public,primary))/*UNV:Public*/), IN(TR.HQCountryCode,""CN""), IN(TR.ExchangeCountryCode,""US""), IN(TR.TRBCEconSectorCode,""57""), TR.CompanyMarketCap>=43957372608.65, CURN=USD)',list("TR.CommonName","TR.HeadquartersCountry","TR.ExchangeCountry","TR.TRBCEconomicSector","TR.CompanyMarketCap"), parameters= list('curn'='usd','RH=In','CH=Fd'))



Best Answer

  • Jirapongse
    Jirapongse admin
    Answer ✓

    @Danni.Qiu

    Please try this one:

    result9<-get_data(instruments='SCREEN(U(IN(Equity(active,public,primary))), IN(TR.HQCountryCode,"CN"), IN(TR.ExchangeCountryCode,"US"), IN(TR.TRBCEconSectorCode,"57"), TR.CompanyMarketCap>=43957372608.65, CURN=USD)',
                      list("TR.CommonName","TR.HeadquartersCountry","TR.ExchangeCountry","TR.TRBCEconomicSector","TR.CompanyMarketCap"), 
                      parameters= list('curn'='usd'))
    result9

    image

Answers

  • Hi @Danni.Qiu

    I cannot confirm the R community version.

    However on Eikon Data API(Python)

    I have to replace "" with " on your syntax.


    image


    syntax = 'SCREEN(U(IN(Equity(active,public,primary))), IN(TR.HQCountryCode,"CN"), IN(TR.ExchangeCountryCode,"US"), IN(TR.TRBCEconSectorCode,"57"), TR.CompanyMarketCap>=43957372608.65, CURN=USD)'

    fields = ['TR.CommonName','TR.HeadquartersCountry','TR.ExchangeCountry','TR.TRBCEconomicSector','TR.CompanyMarketCap']

    df,e = ek.get_data(syntax, fields)
    df.tail(10)


  • Hi, thanks for the quick reply. I just tried your method, it still doesnt work

  • You should report the issue to the R API contributor.

    Note that this is not released by Refinitiv and it is not Refinitiv product.