Official Python library for TradingHours.com. Download market holidays and trading hours data locally for fast, offline access to 1,000+ exchanges worldwide.
About the Data
We support over 1,000 exchanges and trading venues around the world, including all major currencies. See all supported markets →
Data Coverage:
- Market holidays and non-settlement dates
- Trading hours with detailed phase information
- Half-days and irregular schedules
- Currency holidays for FX markets
- Pre-trading, post-trading, and auction times
Data Quality:
Our global research team collects and verifies trading hours and market holidays using primary sources exclusively. Manual and automated checks ensure the highest degree of accuracy and reliability. Data updates occur daily.
Why Use the Python Library?
- ⚡ Blazing fast - No network latency, instant queries from local database
- 🚫 No rate limits - Run unlimited queries without throttling
- 💾 Offline access - Works completely offline after initial download
- 🔧 Simple integration - Simple and user-friendly interface handles all complexity
Two Modes of Operation
📦 Package Mode
Use as a Python package
pip install tradinghours
tradinghours import
from tradinghours import Market
Market.get('US.NYSE')
Perfect for:
- Python applications & scripts
- Data analysis & backtesting
- Trading algorithms
🚀 Server Mode
Run as REST API server
pip install tradinghours[server]
tradinghours serve
>> curl http://127.0.0.1:8000/markets/US.NYSE
{"fin_id":"US.NYSE","exchange_name":"New York...
Perfect for:
- Microservice and multi-language infrastructure
- Low latency and no rate limits
- Fully private and on-premise hosting
Requirements
- Python: 3.9 or higher
- Subscription: Active TradingHours.com subscription (get a quote)
- API Token: Available from your account page
Alternative: Web API
Prefer not to install a Python library? Use our REST API, access the data on the Snowflake Marketplace, or get in touch with us for more information.
License
Commercial - See TradingHours.com for licensing details.
Metadata
Release files for tradinghours 0.6.2
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 |
|---|---|---|---|---|
| tradinghours-0.6.2.tar.gz | 33.4 kB | Without provenance | Details for tradinghours-0.6.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tradinghours-0.6.2-py3-none-any.whl | Python 3 | none | any | Details for tradinghours-0.6.2-py3-none-any.whl |
Total release size: 71.0 kB
Release files / tradinghours-0.6.2.tar.gz
| Download URL | tradinghours-0.6.2.tar.gz |
|---|---|
| Size | 33.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a80d65eabf199176baeae8e87c6c610560299a07339d700ae17bf17643ff48e5
|
|
BLAKE2b-256 checksum How to use checksums |
3e603fff6bf22d4a6e422376556a379c18cd9fb14cd8b031d66ba1aba2a4ce24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.34.2
|
Release files / tradinghours-0.6.2-py3-none-any.whl
| Download URL | tradinghours-0.6.2-py3-none-any.whl |
|---|---|
| Size | 37.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
be71d448fa9274a9bf79ce22c26bf4f4c08f06938f0a979c9730659b4c1efd90
|
|
BLAKE2b-256 checksum How to use checksums |
f4d6ee950dc46ad5aefd18c12164f306dfc439ac822b56a2218c8ee77dbf3548
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.34.2
|
Security for tradinghours 0.6.2
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.