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
3 0 1 5

How to retrieve the holiday dates of all these instruments ESc1, HGc1, CLc1, USc1, GCc1 via Eikon Python API?

I have ESc1, HGc1, CLc1, USc1, and GCc1 contracts. I'm using the Eikon Python API. I need to retrieve the holiday dates of all these instruments. Please tell me the command to do so


Similar to this in Eikon Chart

chart-api.png

#productapipython api
chart-api.png (55.7 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.

Hello Team,


Any update on this please?

@jeremiemae.celajes

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS

Upvotes
Accepted
17.3k 82 39 63

Hi @jeremiemae.celajes

As far as we are aware, there is no specific API that allows you to retrieve the holiday for a specific RIC - the suggestion above will allow you to pull down the holiday schedule within a specific country. I would suggest you reach out to the desktop "Help & Support" (F1) option within the desktop - they can confirm if such a feature is available for users to access via an 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.

Upvotes
14.2k 30 5 10

Hi @jeremiemae.celajes ,

The Eikon Data API get_data and get_timeseries functions return data to the application as the Pandas DataFrame object. Then the application can use Pandas to_excel or to_csv function to export data to Excel/CSV file format.

I suggest you check the Eikon Data API tutorials page which will give you an idea of how to get data from the API.

If you want to export the "Graph" to Excel, you can draw the Pandas DataFrame object to be a graph with any libraries (such as matplotlib.pyplot) and use other 3rd party Python-Excel libraries to export Dataframe and Graph to Excel. You can find more examples of how to export data and graphs to Excel with the xlwing library in the following articles:

The articles use Refinitiv Data Platform Library for Python as an example API, but it should be adapted to Eikon Data API easily.

Hope this helps and please let me know in case you have any further questions.

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.

Hello @raksina.samasiri


Thanks for the update.


Not a graph but code to get Holiday Dates similar to the Chart screenshot shared. I have tried this

df, error = ek.get_data("ESc1", ["TR.ClosePrice.Date","TR.ClosePrice"],

{'SDate':'2022-01-01', 'EDate':'2022-05-01','Frq':'C'})


But getting an error.


How to retrieve the holiday dates of all these instruments ESc1, HGc1, CLc1, USc1, GCc1 via Eikon Python API?


Is this possible?


Thanks in advance


@raksina.samasiri Is this possible in Eikon Python API
Show more comments

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.