Say I have the tradingsymbol: RELIANCE26JANFUT (instrument token: 12798210) from the current snapshot of instruments. If I got historical data with continuous=True for this instrument token for the dates: start_date = "2025-01-01" ; end_date = "2025-05-31", why do I get OHLCV data past JAN expiry date?
Since I am getting historical data it's getting data for RELIANCE25JANFUT (not RELIANCE26JANFUT) which definitely expires in Jan, but I see valid data past JAN, why is that?
Additionally, when I get historical data for instruments: 1. RELIANCE26JANFUT (instrument token: 12798210) 2. RELIANCE26FEBFUT (instrument token: 15221762)
For the specific date: "2025-02-18"(==start_date==end_date), interval="day" and continuous=True, the OHLCV data is not the same.
To understand the continuous=True parameter in more detail, refer to the official documentation.
Please note that the OHLC values will not be identical to those of individual futures contracts. Continuous futures charts aggregate historical data across contracts by categorizing them into current, near, and far months. When fetching historical data for the current month, data from all historically current-month contracts is combined. Similarly, fetching data for the near month aggregates data from all historically near-month contracts, and the same logic applies to the far month.
1. RELIANCE26JANFUT (instrument token: 12798210)
2. RELIANCE26FEBFUT (instrument token: 15221762)
For the specific date: "2025-02-18"(==start_date==end_date), interval="day" and continuous=True, the OHLCV data is not the same.
Please note that the OHLC values will not be identical to those of individual futures contracts. Continuous futures charts aggregate historical data across contracts by categorizing them into current, near, and far months.
When fetching historical data for the current month, data from all historically current-month contracts is combined. Similarly, fetching data for the near month aggregates data from all historically near-month contracts, and the same logic applies to the far month.