Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • Eikon Data APIs /
avatar image
REFINITIV
Question by balagouda.patil · Nov 13, 2018 at 03:26 AM · news eikon api java sdk

How to get news headlines for list of stocks at once using Python API?

For a one share I do :

ek.get_news_headlines(query='R:ALCLS.PA IN FRENCH', date_from='2018-11-05', date_to='2018-11-11', count=20)

How can I do for my all portfolio (BpiFrance)?

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

3 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by simone.dacosta · Nov 13, 2018 at 05:01 AM

try using PF:portfolioname in your query -> ie. ek.get_news_headlines(query='PF:BpiFrance IN FRENCH', date_from='2018-11-05', date_to='2018-11-11', count=20)

Comment
balagouda.patil

People who like this

1 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
balagouda.patil · Nov 13, 2018 at 09:07 AM 0
Share

@simone.dacosta thanks it worked. User asking any way they can add filters like they want only important news and not all news.

Some kind of information which directly impact the compagny , no macro economics news

avatar image
REFINITIV
Answer by simone.dacosta · Nov 13, 2018 at 09:57 AM

the news code for major news (not all news) is NEWS1 - so i would definitely suggest adding this, as well as a language filter. I would suggest adapting a news browser window in Eikon to the needs and then to copy the text over into the code.

I have a news monitor (F9) on my Eikon desktop that has the following filters Topic:NEWS1 NOT R:AMZN.O NOT Topic:BRXT AND Language:LEN and I can simply paste that into my Jupyter notebook:

ek.get_news_headlines(query='Topic:NEWS1 NOT R:AMZN.O NOT Topic:BRXT AND Language:LEN', count=20)

Bringing your attention to the fact you can use things like Topic, RIC, Language etc.

Good luck!

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
Answer by feras.obeid · Sep 12, 2020 at 03:09 AM

@simone.dacosta How can we do the same for lets say sp500 underlying stocks news headline? Thank you!

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

avatar image
REFINITIV
Alex Putkov. ♦♦ · Sep 14, 2020 at 02:12 PM 0
Share

@feras.obeid

When asking a new question, please always start a new thread. Old threads with accepted answers are not monitored by forum moderators. A post added to an old thread can easily me missed and not receive a response.

To answer your question, if you'd like company news for all index constituents, you need to retrieve index constituents, transform the list of constituent RICs into a space separated string and use the latter as the news search expression. E.g.

df, err = ek.get_data('0#.SPX','TR.RIC')
instr = df['Instrument'].tolist()
news_search_expr = ' '.join(instr)
ek.get_news_headlines(news_search_expr)

Alternatively you can use the index RIC as the news search expression, which retrieves the news headlines relevant to the index or the stock market the index represents.

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
9 People are following this question.

Related Questions

Eikon Extension or Plugin Support

  • Feedback
  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Careers
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Calais
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRIT
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • World-Check Data File
  • Explore
  • Tags
  • Questions
  • Badges