Current release notice - 16 November 2026 ======================================== AION Indian Market Calendar 1.8.0 was published on 15 November 2026. This retained 1.7.1 guide below is HISTORICAL and is not the current API contract. For supported APIs and current examples, use: https://github.com/AION-Analytics-India/aion-indian-market-calendar https://aionanalytics.in/models/indian-market-calendar Manually upgrade the Python environment that runs your application: python -m pip install --upgrade aion-indian-market-calendar The 1.8.0 bundle covers 2026-01-01 through 2026-12-25, not 2027. NSE INR CDS pairs use 09:00-17:00 IST and currency-specific holidays. Confirmed NSE Muhurat windows are date- and segment-specific; do not use the old provisional evening assumption below. Unknown dates refuse in 1.8.0. Calendar-data refresh does not install Python software. Production automatic software installation remains disabled; ordinary pip registers no updater. Historical 1.7.1 guide follows; retained for release history only. --------------------------------------------------------------- AION Indian Market Calendar: Developer Guide ============================================= Package: aion-indian-market-calendar License: MIT PyPI: https://pypi.org/project/aion-indian-market-calendar/ Install: pip install aion-indian-market-calendar Documented release: 1.7.1 (2 November 2026). Check PyPI for current releases. Changelog: https://github.com/AION-Analytics-India/aion-indian-market-calendar/blob/main/CHANGELOG.md AION Analytics (India): distinct from Aion Analytics LLC (United States) and AION Labs (Israel). Overview -------- A Python package that answers whether an Indian exchange segment is open: right now, on a given date, or at a given time. Market-times agnostic: each segment has its own session window and holiday calendar. No API key. Works offline with bundled data; the data also refreshes at most daily from a hash-verified public repository (AION_IN_CALENDAR_OFFLINE=1 turns that off). What changed in 1.7.1 --------------------- The MCX and NSE commodity close now depends on the date: 23:30 IST while US Daylight Saving is in effect, 23:55 IST during US Standard Time. The state is read from the IANA zone database for New York. Earlier dates are corrected too. Times are for non-agri contracts; MCX agri contracts close earlier and are not modelled per contract. is_us_daylight_saving(day) Is US Daylight Saving in effect on this day? commodity_close(day) The regular non-agri close by that rule. get_session also applies holidays. 1.7.0 was tagged but never reached PyPI; 1.7.1 has the same behaviour. Sources: MCX/TRD/068/2026, MCX/TRD/550/2026, NSE/COM/76446, NSE/COM/71784. What changed in 1.6.0 --------------------- Settlement days, intraday phases, derivative expiry dates and Muhurat sessions, computed from the same hash-verified data. No new dependency, no network access. is_settlement_day(day) NSE Clearing settlement days. 19 Feb, 19 Mar, 1 Apr and 26 Aug 2026 trade and do not settle. settlement_holidays(year) get_market_phase(at, market) PRE_OPEN, CONTINUOUS, CLOSING_AUCTION, POST_CLOSE, MUHURAT_TRADING or CLOSED get_expiry_day(index, day) NIFTY weekly Tuesday; NIFTY, BANKNIFTY, FINNIFTY, MIDCPNIFTY, NIFTYNXT50 monthly the last Tuesday; SENSEX weekly Thursday, monthly the last Thursday. A holiday expiry moves to the previous trading day. Sources: NSE circular NSE/FAOP/68747, BSE notice 20250623-59 (contracts expiring from 1 Sep 2025). is_muhurat_trading(day) Diwali session; muhurat_session() gives the window and says when the timings are still provisional. Dates outside the bundled data (currently to 25 December 2026) raise an error instead of guessing. A datetime without a time zone is read as IST and raises a UserWarning; pass a timezone-aware one. The CLI update command now runs the verified data refresh. from aion_indian_market_calendar import get_expiry_day, get_market_phase get_expiry_day("NIFTY", "2026-10-25") # 2026-10-27 get_market_phase("2026-10-26T09:05+05:30", "NSE") # "PRE_OPEN" What changed in 1.5.1 --------------------- SEBI revised the Closing Auction Session (CAS) on 15 October 2026 (circular HO/47/11/11(3)2025-MRD-POD2/I/23843/2026). From 7 December 2026: Stocks with F&O contracts (NSE_EQUITY_FNO_UNDERLYING, BSE_EQUITY_FNO_UNDERLYING): continuous trading to 15:30, closing auction 15:30-15:40 (was to 15:15, auction 15:15-15:35) Equity derivatives (NSE_EQUITY_DERIVATIVES, BSE_EQUITY_DERIVATIVES): to 15:45 (was 15:40); expiring index contracts stop at 15:30 on their expiry day Other equities and the 15:50-16:00 post-close session: unchanged Dates before 7 December keep the August timings. NSE commodity non-agri contracts trade to 23:55 from 2 November 2026 to 12 March 2027. 1.5.1 also corrects the PyPI description and links that 1.5.0 published out of date. Segments covered ---------------- NSE NSE equities (09:00-15:30 IST) NSE_EQUITY Alias for NSE NSE_EQUITY_FNO_UNDERLYING NSE stocks with F&O contracts (to 15:15, closing auction 15:15-15:35; from 2026-12-07 to 15:30, auction 15:30-15:40) NSE_EQUITY_DERIVATIVES NSE F&O / NFO (09:15-15:40 IST; 09:15-15:45 from 2026-12-07) NSE_CURRENCY_DERIVATIVES NSE CDS: USDINR, EURINR, GBPINR, JPYINR (09:00-17:00 IST) NSE_COMMODITY_DERIVATIVES NSE commodity derivatives (09:00-23:30 IST during US Daylight Saving, 09:00-23:55 during US Standard Time) NSE_INTEREST_RATE_DERIVATIVES IRD (09:00-17:00 IST) NSE_CORPORATE_BONDS CBRICS (09:00-17:15 IST) BSE BSE equities (09:15-15:30 IST) BSE_EQUITY_FNO_UNDERLYING BSE stocks with F&O contracts (same timings as the NSE subset) BSE_EQUITY_DERIVATIVES BSE F&O (as NSE F&O) MCX MCX commodities (same hours as NSE commodity derivatives) Instrument aliases (resolve to their primary segment automatically): USDINR, EURINR, GBPINR, JPYINR → NSE_CURRENCY_DERIVATIVES NIFTY, BANKNIFTY, FINNIFTY → NSE_EQUITY_DERIVATIVES SENSEX, BANKEX → BSE_EQUITY_DERIVATIVES CRUDEOIL, GOLD, SILVER → MCX Short aliases: CDS → NSE_CURRENCY_DERIVATIVES FNO, NFO → NSE_EQUITY_DERIVATIVES NSE Currency Derivatives (CDS): important differences ------------------------------------------------------- CDS is the most commonly mishandled segment in Indian market code. Session: 09:00-17:00 IST (90 minutes longer than NSE equity) Holidays: CDS observes its own holiday list. Some days when NSE equity is closed, CDS may be open (and vice versa). Always pass NSE_CURRENCY_DERIVATIVES or "CDS", never use the NSE equity calendar as a proxy. Instruments: USDINR, EURINR, GBPINR, JPYINR futures and options. A script checking "is NSE open?" and using that answer for CDS workflows will produce wrong results. Pass the segment explicitly. Basic usage ----------- from aion_indian_market_calendar import IndiaMarketCalendar from datetime import datetime from zoneinfo import ZoneInfo cal = IndiaMarketCalendar.bundled(year=2026) tz = ZoneInfo("Asia/Kolkata") now = datetime.now(tz) # Segment checks. On a calendar object, pass the datetime first and the # market as a keyword; the module-level helper is market-first. cal.is_market_open(now, market="NSE") # NSE equity cal.is_market_open(now, market="NSE_CURRENCY_DERIVATIVES") # CDS cal.is_market_open(now, market="CDS") # same cal.is_market_open(now, market="USDINR") # same: resolves to CDS cal.is_market_open(now, market="MCX") # MCX cal.is_market_open(now, market="BSE") # BSE # Holiday list for a segment cal.holidays("NSE_CURRENCY_DERIVATIVES") # Is a given date a trading day? cal.is_trading_day(now, market="NSE") cal.is_trading_day(now, market="NSE_CURRENCY_DERIVATIVES") # Muhurat trading (annual Diwali session on NSE/BSE) cal.is_trading_day(now, market="NSE") # includes Muhurat days MCX two-segment day ------------------- MCX has one continuous session, with the close set by the US clock: 09:00-23:30 IST during US Daylight Saving 09:00-23:55 IST during US Standard Time The pre-open window 08:45-08:59 is also tracked. Pass "MCX" and the package returns the right open/closed state for the time given. Integration patterns -------------------- Scheduler guard (skip non-trading days): if not cal.is_trading_day(datetime.now(tz), market="NSE"): sys.exit(0) # not a trading day, nothing to do Order guard (check if market is currently open): if not cal.is_market_open(datetime.now(tz), market="NSE_CURRENCY_DERIVATIVES"): raise RuntimeError("CDS market closed: cannot route order") Backtesting date range: from datetime import timedelta start = datetime(2026, 1, 1, tzinfo=tz) end = datetime(2026, 6, 30, tzinfo=tz) trading_days = [ start + timedelta(days=i) for i in range((end - start).days) if cal.is_trading_day(start + timedelta(days=i), market="NSE") ] Data freshness -------------- Holiday and session data is bundled at install time. For the current year, use IndiaMarketCalendar.bundled(year=). Since 1.4.0 the package refreshes that data at most once a day from https://github.com/AION-Analytics-India/aion-market-calendar-data. Every file must match its SHA-256 in the manifest before it is adopted. Set AION_IN_CALENDAR_OFFLINE=1 to use the bundled data only. The older opt-in live-refresh endpoint was removed in 1.4.1. Links ----- PyPI: https://pypi.org/project/aion-indian-market-calendar/ GitHub: https://github.com/AION-Analytics-India/aion-indian-market-calendar HuggingFace: https://huggingface.co/aion-analytics-india/aion-indian-market-calendar Website: https://aionanalytics.in/open-source/indian-market-calendar Contact: contact@aionanalytics.in