A股交易日历以及日内交易时间
Project description
xcals
安装
pip install -U xcals
使用示例
import xcals
print(xcals.__version__)
# 更新最新交易日数据(不定时更新)
xcals.update()
# 获取交易日列表
xcals.get_tradingdays()
# 获取最新交易日
xcals.get_recent_tradeday()
# 获取前5个交易日
xcals.shift_tradeday("2025-05-06", -5)
# 获取最新财报日期
xcals.get_recent_reportdate("2025-05-06") # 2025-03-31
# 获取前5个财报日期
xcals.shift_reportdate("2025-03-31", -5)
# 获取日内交易时间
xcals.get_tradingtime(freq="1s") # 分钟频: freq="1min"
# 移动交易时间
xcals.shift_tradetime("09:45:00", "10min5s") # 前推5秒: -5s
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xcals-0.1.2.tar.gz
(4.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
xcals-0.1.2-py3-none-any.whl
(4.9 kB
view details)
File details
Details for the file xcals-0.1.2.tar.gz.
File metadata
- Download URL: xcals-0.1.2.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e648875959f9144becb05c4c74b208e252c6f00163f9086ec738d560c3b335d7
|
|
| MD5 |
c375e43cb80cc06bdaeb6b714701a83d
|
|
| BLAKE2b-256 |
c18538fa41a19688de596fd0e7b3a82604d81aea4e0c96b710be9dae1b08c352
|
File details
Details for the file xcals-0.1.2-py3-none-any.whl.
File metadata
- Download URL: xcals-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70cc9b596575a71d0716ef9f6e1185ca8781d567a663aca2ffb5bab82ba4542b
|
|
| MD5 |
e05469344abe30d1774ff933e0f65a5a
|
|
| BLAKE2b-256 |
a74c54609eca72cc20dfbfb8ac25faf45bc01e5ae4e1bd5249c048abfd26fc6d
|