Skip to main content

TradingHours Library

Project description

TradingHours API Docs

TradingHours.com Python Library

PyPI version Python versions GitHub Actions

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

View complete documentation →

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

📖 Documentation →


🚀 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

📖 Documentation →

Requirements

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tradinghours-0.6.1.tar.gz (59.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tradinghours-0.6.1-py3-none-any.whl (37.6 kB view details)

Uploaded Python 3

File details

Details for the file tradinghours-0.6.1.tar.gz.

File metadata

  • Download URL: tradinghours-0.6.1.tar.gz
  • Upload date:
  • Size: 59.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.5

File hashes

Hashes for tradinghours-0.6.1.tar.gz
Algorithm Hash digest
SHA256 aa4b4f71e730829b8573dc0a279604a08a35c90dd01c927038b61912e4f42f41
MD5 5c6b8737ce1d26052ce7cfce0468f736
BLAKE2b-256 264cbd256ff5e2f5f22bac1f8346dce10724ef0e4885849126710072943140ef

See more details on using hashes here.

File details

Details for the file tradinghours-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: tradinghours-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 37.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.5

File hashes

Hashes for tradinghours-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 51dc94a53f119e81b95e2a3b519174958aff69cd4fd6d589e570915638e9416f
MD5 602ff466845442b332c58b9a7b0610f6
BLAKE2b-256 c766807166428c47d9ba02b1ece29189804c0003a3aa9c8174158fa7974674cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page