Upgrade from Eikon -> Workspace. Learn about programming differences.

For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 0

Python API Eikon Refinitiv does not bring the latest new id

Hello Team,

I am using the following code to get news from eikon refenitiv, but it is retrieving just the old news.

df_news = ek.get_news_headlines(query='CRF: Carbon', count=10)
story_id = df_news.loc[df_news['text'].str.contains('CRF: Carbon EUA daily outlook')]['storyId'][0]
# Show the news in HTML format
top_news_story = ek.get_news_story(story_id)
HTML(top_news_story)

For example, here a screenshot of the the news that I would like to get the id everyday in order to get the infoirmation, because every day they release it in the morning. But when I try to get it using python, I get just a old one, and not the newest one.

Here the news that I would like to retrieve:


1690371181849.png


And this is what I get in my requestion:

1690371137435.png

It does not correspond to one release today.

Can anyone help me?


#contentnewsnews-filternews-text-analyticsnews-topic-code-list
1690371137435.png (18.8 KiB)
1690371181849.png (111.6 KiB)
icon clock
10 |1500

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

Upvotes
Accepted
80.3k 259 52 75

@Tr.Nguyen

Thank you for reaching out to us.

You are using differnt queries.

In ek.get_news_headlines, you use 'CRF: Carbon'. However, in News Monitor, you use:

1690425405779.png

To get the same news headlines, you need to use the same query. For example, the code should be like this:

df = ek.get_news_headlines('PresetTopic:[Energy Market] AND \\"carbon\\"',count=10)

The output is:

1690425795990.png



1690425405779.png (10.4 KiB)
1690425795990.png (117.3 KiB)
icon clock
10 |1500

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

Upvotes
1 0 0 0

Hi @Jirapongse,


Thank you very much for your answer, helped a lot already. But testing your suggestion, I saw that I cannot retrive the full report, just the first paragraph. Also when I open the same news through Eikon Refinitv Program, it has a link redirecting to another page, where I can find the full report.

Do you know how I can get access to the full report through Python API? Should I add somtning else in the code you provided me?

Here some screenshots:

This is what I get through my search in Python and using Eikon Refitiv Desktop program:
1690444670420.png If you read it, it has a link to the full report. How can I access the full report directly through Python?


Thanks in advance.


1690444670420.png (78.0 KiB)
icon clock
10 |1500

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

Upvotes
80.3k 259 52 75

@Tr.Nguyen

I think it is an internal link to open another Eikon app.

1690448456548.png

Eikon Data API is unable to access it.

You may contact your Refinitiv account team or sales team to verify if there is another product that can access this report directly.


1690448456548.png (42.6 KiB)
icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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