惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
Check Point Blog
aimingoo的专栏
aimingoo的专栏
Jina AI
Jina AI
Microsoft Security Blog
Microsoft Security Blog
IT之家
IT之家
V
Visual Studio Blog
量子位
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 聂微东
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
大猫的无限游戏
大猫的无限游戏
Y
Y Combinator Blog
Stack Overflow Blog
Stack Overflow Blog
D
Docker
MyScale Blog
MyScale Blog
小众软件
小众软件
云风的 BLOG
云风的 BLOG
美团技术团队
Microsoft Azure Blog
Microsoft Azure Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Last Week in AI
Last Week in AI
Apple Machine Learning Research
Apple Machine Learning Research
博客园 - 【当耐特】

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
aion-indian-market-calendar: Python market calendar for N...
AION ANALYTI · 2026-05-17 · via DEV Community

AION ANALYTICS

If you build for Indian markets, market timing should not live as hardcoded if/else logic inside bots, cron jobs, or trading scripts.

aion-indian-market-calendar is a Python package for Indian market holidays, NSE trading calendar checks, BSE trading session checks, MCX evening session handling, and simple is market open today in India validation for developers.

## Install


bash
  pip install aion-indian-market-calendar

  ## Import

  from aion_indian_market_calendar import IndiaMarketCalendar, is_market_open, next_trading_day

  ## What problem this solves

  A lot of trading systems start with a few hardcoded dates and standard market hours.

  That usually breaks for Indian markets because:

  - holidays change year to year
  - NSE, BSE, and MCX do not behave the same way
  - partial sessions matter
  - commodity sessions and evening sessions need separate handling
  - execution systems need a timing layer before they touch broker or order logic

  This package exists to make market session validation a reusable infrastructure layer instead of a fragile script-level shortcut.

  ## What developers get here

  This is not a generic exchange-calendar post.

  This package is specifically useful when you need:

  - NSE holidays in Python
  - BSE trading calendar checks
  - MCX trading hours and evening-session handling
  - Indian stock market calendar logic for bots and schedulers
  - is market open today India checks before execution
  - next trading day lookup for Indian markets

  For developers, the main difference is practical.

  aion-indian-market-calendar gives you a more direct India-focused execution surface:

  - simple is_market_open() helper
  - next_trading_day() helper
  - session-aware get_session() lookups
  - support for Indian market aliases like NFO and FNO
  - support for instrument-style inputs like NIFTY, BANKNIFTY, and SENSEX
  - bundled offline calendar data
  - optional live event refresh for schedule changes and deltas
  - explicit Asia/Kolkata handling for Indian-market workflows

  ## Example

  from aion_indian_market_calendar import is_market_open

  if is_market_open("NSE"):
      print("NSE is open")
  else:
      print("NSE is closed")

  And if you need more than a yes/no answer:

  from datetime import datetime
  from aion_indian_market_calendar import IndiaMarketCalendar

  cal = IndiaMarketCalendar.bundled(2026)
  probe = datetime.fromisoformat("2026-01-27T09:05:00+05:30")

  print(cal.is_market_open(probe, "NSE_EQUITY"))
  print(cal.get_session(probe, "NFO"))

  ## Why I built this

  I kept seeing the same issue in Indian-market tooling:

  developers were forced to mix strategy logic with exchange-timing logic.  Got tired of hardcoding dates based on published calendar by NSE/BSE/MCX.  

  That is a bad boundary.

  Your strategy should decide what to do.
  Your calendar layer should decide whether the market session is actually valid.

  That separation matters even more in algorithmic trading, quantitative finance, execution schedulers, and pre-trade validation systems.

  ## What this is not

  This package is not:

  - a broker API
  - an order-routing tool
  - a data feed
  - a strategy engine
  - a compliance substitute for exchange circulars

  It is a focused India financial market calendar layer for developers.

  ## Download

  - PyPI: pip install aion-indian-market-calendar
  - Package index: https://pypi.org/project/aion-indian-market-calendar/

  If you build for NSE, BSE, MCX, or India-specific trading infrastructure, this package is meant to remove one boring but expensive class of bugs: running execution logic when the session assumptions are wrong.

like one of the users quoted "This is the kind of infra tooling that quietly saves people from painful production bugs later. Timing logic around Indian markets gets messy fast once you mix NSE, BSE, MCX, holidays, and evening sessions.

Also very true about LLM-generated trading bots defaulting to generic market calendars. AI is great at scaffolding systems, but regional operational details like this are where specialized tooling still matters a lot."

Cheers,
Lokesh (AION ANALYTICS)

Enter fullscreen mode Exit fullscreen mode