Query regarding "refinitiv.data" function get_history(). How to get month end dates data?

I am working with Python API and the library refinitiv.data in it. There is the function refinitiv.data.get_history
get_history(
universe: Union[str, Iterable[str]],
fields: Union[str, Iterable[str], None] = None,
interval: Optional[str] = None,
start: "OptDateTime" = None,
end: "OptDateTime" = None,
adjustments: Optional[str] = None,
count: Optional[int] = None,
use_field_names_in_headers: bool = None,
parameters: Union[str, dict, None] = None,
)
My input is a list of RICs for "universe" argument, a list of fields for "fields" argument. What I want to get is data between July 2024 to June 2025, but only for all month end dates. From what I understand, there is the"interval" parameter sent to monthly, but how do I ensure it gets end dates?
I don't want it to get 30th of each month but end of each month. Does it automatically pick that up?
Say I give start date as June 30, and give monthly as argument, it would probably pick up July 30 next right? How to ensure it picks up July 31, August 31, September 31, and so on?
Answers
-
The get_history function will provide the bar data and bars are usually aggregated over the interval that is specified. When the interval is monthly, the data provided is not the one at the end of the month.
If you are interested in getting data for a specific date, then select the interval=daily, and in then pick the data for the end of the month. The library does not have any means to do it automatically.
1 -
@Gurpreet thank you.
Can you give me a sample script for AAPL.O from January 2025 to June 2025 monthly data.
Thank you
0 -
The LD Library GitHub repo has an elaborate example which shows historical data examples.
0 -
Try this:
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 696 Datastream
- 1.5K DSS
- 632 Eikon COM
- 5.2K Eikon Data APIs
- 12 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 4 Trading API
- 2.9K Elektron
- 1.4K EMA
- 256 ETA
- 562 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 281 Open PermID
- 46 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 745 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 122 Open DACS
- 1.1K RFA
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 96 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛