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.0.3.tar.gz
(3.8 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.0.3-py3-none-any.whl
(4.3 kB
view details)
File details
Details for the file xcals-0.0.3.tar.gz.
File metadata
- Download URL: xcals-0.0.3.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a338475342d35c5246c908606d2b04fda8dcdf653fec035770271f18d81f520
|
|
| MD5 |
22e632d814109ad4725294d74524e58e
|
|
| BLAKE2b-256 |
3f2cbe3cab35fbf6cdaa3c43a8167b39beb7497ce71b8cfe5d286d216ac0241a
|
File details
Details for the file xcals-0.0.3-py3-none-any.whl.
File metadata
- Download URL: xcals-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e876e6c709d19378d04a2b2c44fb52311af24cb7af8f49da9405fc061103ce6
|
|
| MD5 |
5b3fcac6c1977bb09a589a64173ac166
|
|
| BLAKE2b-256 |
12f791d87d36e30c3841badcdcd1aca30fdd3318811e27e85f18238323501571
|