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-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
icon clock
10 |1500

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

Upvote
Accepted
1.7k 2 4 7

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 5.0 MiB each and 10.0 MiB total.

Upvote
6.7k 8 6 7

@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 5.0 MiB each and 10.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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea