Skip to main content

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


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.3b0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

xcals-0.0.3b0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file xcals-0.0.3b0.tar.gz.

File metadata

  • Download URL: xcals-0.0.3b0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for xcals-0.0.3b0.tar.gz
Algorithm Hash digest
SHA256 279f618f3820122158d8ae8fe7ab43a9e7ec370cb29b49fdb45ab5bafc4eb36e
MD5 2a14de07a872c440129a286871d6835a
BLAKE2b-256 03c644f7bfb4aeab5a7aa11bdd1ec2326485caa491ef7788726f4863fe9a8f8c

See more details on using hashes here.

File details

Details for the file xcals-0.0.3b0-py3-none-any.whl.

File metadata

  • Download URL: xcals-0.0.3b0-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

Hashes for xcals-0.0.3b0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc1ba15c00e01fca6e08e03c02640e125ebcf6925b715237e3cabe8ffe16f0b4
MD5 05a36f6df770358ed75f155d99483ccc
BLAKE2b-256 d068111e59137fede55016b8b7726fc9ed8d6bcabd87ef3d4346d384d2081e38

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