Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

Install from PyPI: pip install aion-indian-market-calendar

Standalone Python package for Indian market sessions, holidays, and market-open checks. This Hugging Face repo mirrors the package artifacts and documentation.

aion-indian-market-calendar

Indian stock market calendar API for Python — NSE trading calendar, MCX trading hours, and market timings for trading bots.

aion-indian-market-calendar is an nse trading calendar python package, an indian stock market calendar python library, and a market calendar api india option for developers who need correct sessions, trading holidays, and is market open today india python checks. It is built for intraday trading calendar india and algo trading market timings nse use cases where execution engines must know whether the market is actually open before placing orders.

Works as a market calendar api python layer for NSE, BSE, and MCX, including trading hours api india and stock market calendar api india use cases for quantitative finance, algo trading, and broker-side pre-trade validation.

Acts as a market-timing layer for trading APIs and execution systems in India.

Includes macro-event awareness for RBI, Budget, FOMC, and exchange schedule changes.

If you tried pandas_market_calendars india, pandas_market_calendars nse, or pandas_market_calendars mcx and ran into incorrect holidays or missing commodity sessions, this is the alternative to pandas_market_calendars india that fixes those gaps.

Works for:

  • NSE trading calendar python
  • MCX trading hours python
  • Indian stock market holidays API
  • is market open today India
  • intraday / algo trading systems needing correct market timings
  • alternative to pandas_market_calendars for India

Used in:

  • trading bots (Zerodha, Angel One, Upstox)
  • intraday and algo trading systems
  • automation workflows (n8n, Zapier, Python scripts)
  • APIs that need accurate NSE/BSE/MCX market timings

Structure

aion_indian_market_calendar/
├── __init__.py
├── calendar.py
├── models.py
├── data/
│   └── events_2026.json
├── tests/
│   ├── conftest.py
│   └── test_calendar.py
├── pyproject.toml
└── README.md

Quick Start

Simple Python API, no external services required. Use it for prevent trades outside market hours python, trading bot market hours india, and nse trading hours for bot checks before execution.

Useful for:

  • NSE API integrations
  • trading bot development India
  • market hours validation before order execution

Is the market open right now?

from aion_indian_market_calendar import is_market_open

is_market_open("NSE")  # True / False for "is nse open today"
is_market_open("MCX")  # Handles mcx evening session python cases correctly

Used in intraday trading and algo trading systems to prevent execution during closed sessions. This directly answers is stock market open today india python and check market status nse python use cases.

Next trading day

from aion_indian_market_calendar import next_trading_day

next_trading_day("NSE")

Full calendar API

from datetime import datetime
from zoneinfo import ZoneInfo

from aion_indian_market_calendar import IndiaMarketCalendar

cal = IndiaMarketCalendar.bundled(2026)
ist = ZoneInfo("Asia/Kolkata")
now = datetime.now(ist)

# Check if NSE equity is trading right now
print("NSE open?", cal.is_market_open(now, "NSE_EQUITY"))

# Get today's exact trading session (accounts for partial MCX days)
session = cal.get_session(now, "MCX")
for seg in session or []:
    print(f"MCX: {seg.open} - {seg.close}")

# List all NSE equity holidays for 2026
for d in cal.holidays("NSE_EQUITY", 2026):
    print(d)

Designed for trading systems, bots, and execution engines that require accurate Indian market timings. This is a python library for indian stock market calendar, how to handle trading holidays in india python, and market session timing nse mcx python package rather than a generic U.S.-centric calendar wrapper.

Why This Exists

Most calendar libraries do not model Indian exchanges deeply enough. Common pain points include:

  • pandas market calendar nse incorrect holidays
  • fix pandas_market_calendars india holidays
  • no usable mcx holiday calendar python
  • missing mcx market open time india and mcx trading hours today
  • no clean answer to how to check if market is open before placing trade python

Why Developers Choose aion-indian-market-calendar

  • Save weeks of engineering: no need to scrape NSE circulars, parse Hindu calendars, or model mcx commodity market calendar edge cases
  • Production-ready: verified against official exchange calendars and tested for known edge cases
  • Live delta updates: refresh from a remote URL, no pip install --upgrade needed for every holiday change
  • LLM-friendly: static JSON and live endpoint are machine-readable, so coding assistants can query or embed the package
  • Better commodity support: includes mcx evening session python behavior and mcx trading hours python session overrides that most alternatives miss

Features

  • nse trading calendar python coverage for cash, equity derivatives, currency, interest rate derivatives, and corporate bonds
  • indian market holidays python coverage with bundled static data and live delta overrides
  • mcx commodity market calendar support including evening-only trading days and special morning/evening session handling
  • market calendar api india ergonomics with is_market_open(...), next_trading_day(...), and per-segment session inspection
  • intraday trading calendar india support for execution engines that must block orders outside exchange hours

Companion Usage

This package is standalone. It can be used with any broker Zerodha Kite or Upstoxx or Groww websocket or strategy engine, including:

  • risk checks before order placement
  • backtesting systems that need correct Indian market sessions
  • signal validators that need to know whether NSE or MCX was tradable at a given timestamp

Live Refresh

calendar = IndiaMarketCalendar.bundled(
    2026,
    refresh_url="https://<username>.github.io/<repo>/live_events.json",
    refresh_interval_hours=4,
)

calendar.refresh()
  • live deltas are cached at ~/.aion_indian_market/live_cache.json
  • bundled static events remain the fallback
  • live events override bundled events by id
  • deleted_ids can remove bundled events without repackaging the wheel

Delta Format

{
  "version": "20260430-001",
  "generated_at": "2026-04-30T10:00:00+05:30",
  "events": [],
  "deleted_ids": []
}

Notes

  • data/events_2026.json can be either:
    • a plain list of event objects, or
    • an object with top-level metadata plus an events list
  • main typed models:
    • MarketEvent
    • EventPolicy
    • SessionSegment
  • bundled metadata also exposes:
    • calendar.sources
    • calendar.market_timings
    • calendar.default_sessions
  • convenience helpers:
    • is_market_open(market="NSE", at=None, year=2026)
    • next_trading_day(market="NSE", after=None, year=2026)
  • live refresh metadata exposes:
    • calendar.refresh_url
    • calendar.refresh_interval
  • bundled 2026 segment calendars now include:
    • NSE_EQUITY
    • NSE_EQUITY_DERIVATIVES
    • NSE_CURRENCY_DERIVATIVES
    • NSE_COMMODITY_DERIVATIVES
    • NSE_INTEREST_RATE_DERIVATIVES
    • NSE_CORPORATE_BONDS
    • MCX
  • EventCalendar remains available as a compatibility alias for IndiaMarketCalendar
  • the current bundled data is copied from:
    • src/shared_core/risk/special_events_and_holidays.json and extended with:
    • https://nsearchives.nseindia.com/content/RSS/Circulars.xml
    • https://www.nseindia.com/resources/exchange-communication-holidays
    • https://www.mcxindia.com/market-operations/trading-survelliance/trading-holidays
  • repo-side helpers for live updates:
    • scripts/poll_nse_rss.py
    • docs/workflow_templates/update_live_events.yml
    • docs/workflow_templates/publish_live_events.yml

More Documentation

Downloads last month
20