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
321 0 0 2

Get the data file from HNXB

Dear, I am using eikon library to try to get the HNXB (Hanoi Stock Exchange Bond market news) data excel file or the data set in those news screen. Does anyone try it yet?

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
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.

Upvote
Accepted
14k 30 5 10

Hi @khangdiep,

As the URL that can be used for downloading the excel file in get_news_story is CPURL, which can be accessed using Eikon desktop only. (Please see the example of CPURL in the picture below.) Hence, to download the files, Eikon desktop need to be used to launch these CPURLs

1628689679855.png

As the python environment on your local machine cannot download the files directly (it has no Eikon's desktop session, only has API session), however, you can use python to send the URLs to Eikon using Eikon side by side integration API then the files will be downloaded.

you may check how to do so in the selected answer in the thread below

https://community.developers.refinitiv.com/questions/80141/getting-data-frame-directly-from-using-news-api.html


1628689679855.png (65.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.

Upvote
10.1k 18 6 9

@khangdiep So to get all news from the HNXB source please try:

headlines = ek.get_news_headlines('Source:HNXB',count=100)
headlines

1627979534211.png


If you want to get the actual text of the news stories you can use the second news api call, get_news_story:

from IPython.display import HTML
story = ek.get_news_story(headlines['storyId'][0])
HTML(story)

I hope this can help.


1627979534211.png (205.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
321 0 0 2

Hi Jason , thanks for your response but my purpose is not getting the news or the text, each news has a link to the excel file. My goal is to get the EXCEL FILE or the Data Set in Excel file.

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.