# exchange_calendars **Repository Path**: xinxing_me/exchange_calendars ## Basic Information - **Project Name**: exchange_calendars - **Description**: No description available - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-06-04 - **Last Updated**: 2025-06-04 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # exchange_calendars [](https://pypi.org/project/exchange-calendars/)   [](https://github.com/psf/black) A Python library for defining and querying calendars for security exchanges. Calendars for more than [50 exchanges](#Calendars) available out-the-box! If you still can't find the calendar you're looking for, [create a new one](#How-can-I-create-a-new-calendar)! ## Installation ```bash $ pip install exchange_calendars ``` ## Quick Start ```python import exchange_calendars as xcals ``` Get a list of available calendars: ```python >>> xcals.get_calendar_names(include_aliases=False)[5:10] ['CMES', 'IEPA', 'XAMS', 'XASX', 'XBKK'] ``` Get a calendar: ```python >>> xnys = xcals.get_calendar("XNYS") # New York Stock Exchange >>> xhkg = xcals.get_calendar("XHKG") # Hong Kong Stock Exchange ``` Query the schedule: ```python >>> xhkg.schedule.loc["2021-12-29":"2022-01-04"] ```
| open | break_start | break_end | close | |
|---|---|---|---|---|
| 2021-12-29 | 2021-12-29 01:30:00+00:00 | 2021-12-29 04:00:00+00:00 | 2021-12-29 05:00:00+00:00 | 2021-12-29 08:00:00+00:00 |
| 2021-12-30 | 2021-12-30 01:30:00+00:00 | 2021-12-30 04:00:00+00:00 | 2021-12-30 05:00:00+00:00 | 2021-12-30 08:00:00+00:00 |
| 2021-12-31 | 2021-12-31 01:30:00+00:00 | NaT | NaT | 2021-12-31 04:00:00+00:00 |
| 2022-01-03 | 2022-01-03 01:30:00+00:00 | 2022-01-03 04:00:00+00:00 | 2022-01-03 05:00:00+00:00 | 2022-01-03 08:00:00+00:00 |
| 2022-01-04 | 2022-01-04 01:30:00+00:00 | 2022-01-04 04:00:00+00:00 | 2022-01-04 05:00:00+00:00 | 2022-01-04 08:00:00+00:00 |