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.
Best Answer
-
Hi anonymous user
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.raw1
Answers
-
Hi anonymous user ,
Thank you for your question. I believe the correct RIC for UK Holidays is 'GB/HOLIDAY' and for Ireland is 'NXT/HOLIDAY'.
Could you please try with this ticker and see if that resolves your issue?
Best regards,
Haykaz
1 -
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.
0 -
Hi
@h.aramyan01 , Can you please check my above comment ?0 -
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 ?0 -
anonymous user
For Ireland specific you can use "IRL"
0 -
@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 ?
0 -
anonymous user
I can recommend you to use the second enpoint as a discovery reference and please use ISO_4217 standard currency codes. That also accepts historical codes like:
FRF for French Franc --> FRAIEP for Irish Pound --> IRL
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛