... 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
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.
Any update on this please?
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.
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
@jeremiemae.celajes