open-market-calendar
Is the stock market open right now? This package answers from one open data file, on your own machine. No API key, no account, no call to a server per question.
The data is the TradingLookup Open Market Calendar: market hours, holidays and early closes taken from each exchange's own published list.
Install
pip install open-market-calendar
Use
from open_market_calendar import load_calendar, market_status, is_open, upcoming_days
cal = load_calendar() # fetch once, then keep it
market_status(cal, "nyse")
# {'state': 'open', 'reason': 'closes 16:00', 'local': '10:42', 'date': '2026-11-24'}
is_open(cal, "nse") # True, False, or None when the file cannot say
upcoming_days(cal, "nyse")[:2] # next closed days and early closes, each with its source page
market_status(calendar, slug, now=None) returns state (open, closed or unknown), a short reason, and the market's local time and date. Pass a timezone-aware datetime as now to ask about another moment.
Python 3.9+. Standard library only.
To put the dated rows in pandas:
import pandas as pd
df = pd.DataFrame({"market": m["slug"], **d} for m in cal["markets"] for d in m["days"])
What is in the file
One entry per market: time zone, regular sessions, and every closed day, early close and special session we have read from the market's own published list. Each dated row carries the official page it came from (source_url) and the date we read it (checked_at).
Markets with a holiday feed today: NYSE, Nasdaq, London Stock Exchange, NSE and BSE (India), Pakistan Stock Exchange, Nigerian Exchange, Saudi Exchange (Tadawul), the US bond market (SIFMA) and CME futures.
- Data file: https://tradinglookup.com/data/market-calendar.json
- Same rows as a table: https://tradinglookup.com/data/market-calendar.csv
- Calendar feeds (.ics) you can subscribe to: https://tradinglookup.com/market-hours/
Limits, stated plainly
- Coverage differs per market. Each market has
covers.fromandcovers.to; outside those dates the answer isunknown, never a guess. - A market with no confirmed regular hours in the file also answers
unknown. - This is reference data, not trading advice. Check the market's official page before you trade.
Licence
Code: MIT. Data: CC BY 4.0. If you use the data, credit "TradingLookup Open Market Calendar" with a link to https://tradinglookup.com/market-hours/
Metadata
Release files for open-market-calendar 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| open_market_calendar-0.1.0.tar.gz | 6.0 kB | Without provenance | Details for open_market_calendar-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| open_market_calendar-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for open_market_calendar-0.1.0-py3-none-any.whl |
Total release size: 11.7 kB
Release files / open_market_calendar-0.1.0.tar.gz
| Download URL | open_market_calendar-0.1.0.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c960c3d5a2308ac7bb5e817847c05045520adf835f615cbb41985a0d2948efb
|
|
BLAKE2b-256 checksum How to use checksums |
e419fde47d4facdbbd262824c52097513c3f148edcc6d6796f6010145cc5d5af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.13
|
Release files / open_market_calendar-0.1.0-py3-none-any.whl
| Download URL | open_market_calendar-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d2599944be6f9fd7fbb0110fe3d70f8aced1a41c6303f214fdf8cae0bce827e
|
|
BLAKE2b-256 checksum How to use checksums |
f2be7374ba2d4923b27d0a022acdf96cbb520871ecba0492f786cc94c410675d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.13
|
Security for open-market-calendar 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.