Query news in English via python API

I tried the sample code to get news in German like this 'R:LHAG.DE'.

ek.get_news_headlines('R:LHAG.DE', date_from='2017-11-05T09:00:00', date_to='2017-11-08T18:00:00')

How can I get news in English ? what is the 'RIC' code for get_news_headlines func? , 'R:LANG.EN' does not work.

Best Answer

  • Basically, you're can type any news expression. You can validate the expression in Eikon then copy paste it.

    For your example: when you type 'FOMC, FED, US' in News component, it's transformed to 'R:FMSAUBD.MX OR Topic:FED OR Topic:US'. Then you can copy the result in Python request:

    >>> ek.get_news_headlines('R:FMSAUBD.MX OR Topic:FED OR Topic:US', date_from='2017-11-05T09:00:00', date_to='2017-11-08T18:00:00')

    You can add language filter :

    >>> ek.get_news_headlines('( R:FMSAUBD.MX OR Topic:FED OR Topic:US ) AND Language:LEN', date_from='2017-11-05T09:00:00', date_to='2017-11-08T18:00:00')

Answers

  • try

    R:LHAG.DE AND LEN

    LHAG.DE represents the quote of Lufthansa's shares (LHAG) traded on Xetra (DE). LEN represents English as in Language - English, for news in German use LDE.

  • So what symbol should I use to get news in English from Reuters original? What kind of string should I use in blank area below?

    ek.get_news_headlines(' ', date_from='2017-11-05T09:00:00', date_to='2017-11-08T18:00:00')

  • So what symbol should I use to get news in English from Reuters original? What kind of string should I use in blank area below?

    ek.get_news_headlines(' ', date_from='2017-11-05T09:00:00', date_to='2017-11-08T18:00:00')

  • So what symbol should I use to get news in English from Reuters original? What kind of string should I use in blank area below?

    ek.get_news_headlines(' ', date_from='2017-11-05T09:00:00', date_to='2017-11-08T18:00:00')

  • You can do this :

    ek.get_news_headlines('R:LHAG.DE and Language:LEN', date_from='2017-11-05T09:00:00', date_to='2017-11-08T18:00:00')
  • Thanks for your quick response;

    how ever what I really want to do is to get major news headlines not limitied to specific stock name, Lufthansa.

    for example : how to get major news on FOMC, FED, US goverments comments?

    what kind of ticker I should use to fill the 1 st argument in get_news_headlines?

    @pierre.faurel,

    Zhenya Kovalyov