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
9 1 2 6

HOLIDAY LIST using Eikon API in Python Dataframe

I tried to get the Holiday List using Eikon API in Python but no help, can we get in Python pandas dataframe so that we can use it and play with it ? Please see attached my query in python script.holiday-python-script.jpg

eikon-data-api#contentmarket-holidays
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
1.4k 5 3 6

Hi @Wasim Akram

You can get the similar output using one of the endpoints and refinitiv-data library

import refinitiv.data as rd
import pandas as pd

rd.open_session()
url = "https://api.refinitiv.com/analytics/functions/v1/common/list-holidays"
body = {
    "universe": [
        {"startDate": "2023-01-01", 
         "endDate": "2023-12-29", 
         "calendarCodes": ["USA"]}
    ]
}

request = rd.delivery.endpoint_request.Definition(
    method=rd.delivery.endpoint_request.RequestMethod.POST,
    url=url,
    body_parameters=body,
)
response = request.get_data()
pd.DataFrame(response.data.raw["data"][0]["holidays"])

To get the calendarCodes from currency code:

url = "https://api.refinitiv.com/analytics/functions/v1/fx/fx-info"
body = {"universe": 
        [{"currencyCodes": 
          ["USD"]}]}

request = rd.delivery.endpoint_request.Definition(
    method=rd.delivery.endpoint_request.RequestMethod.POST,
    url=url,
    body_parameters=body,
)
response = request.get_data()
response.data.raw
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.

Hi @marcin.bunkowski01 , Thank you so much, this is really very helpful. I need to know one more thing, USD works for United States, do I need to use currency as EUR for Irish Holidays ?
@Wasim Akram

For Ireland specific you can use "IRL"

@marcin.bunkowski01 , thank you very much. This would be my last query under this request/blog : Where can I get all the "calendarCodes" based on country ?

Show more comments
Upvote
5k 16 2 7

Hi @Wasim Akram ,


Thank you for your question. I believe the correct RIC for UK Holidays is 'GB/HOLIDAY' and for Ireland is 'NXT/HOLIDAY'.

screenshot-2023-07-07-at-103832.png

Could you please try with this ticker and see if that resolves your issue?


Best regards,

Haykaz


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.

Hi @h.aramyan01, Thanks for above, however it is not helpful to our purpose. Can't we have the data based on HOL app using Python Eikon API, shown in the attached snapshot, where there is a option pull excel to get proper way in a table format for Holiday list, I want exactly in same in Pandas Python dataframe.hol-list-from-hol-app.jpghol-app-data-using-python.jpg

Hi @h.aramyan01 , Can you please check my above comment ?

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.