Skip to main content

maoxianyong

A 股、港股和美股统一行情数据的只读 Python 包。

from maoxianyong.quant import DailyReader, daily_reader

reader = DailyReader()
history = reader.get("AAPL.US", start="2024-01-01")
qfq_close = reader.get_wide(["AAPL.US", "BABA.US"])
symbols = reader.list_symbols()

# 也可以直接复用包内单例
history = daily_reader.get("AAPL.US", start="2024-01-01")

行情字段(0.2.0)

0.2.0 只支持 V2 行情格式,不兼容旧数据:

open_raw/high_raw/low_raw/close_raw
open_qfq/high_qfq/low_qfq/close_qfq
open_hfq/high_hfq/low_hfq/close_hfq
volume/turnover

蜡烛图和技术指标默认使用前复权字段,历史成交模拟使用未复权字段。 volume 和 turnover 始终为原始口径;没有真实成交额时 turnover 为空。 行情明细不保存 market、currency。

该包默认从阿里云 OSS 读取 Parquet 数据;本地 ETL 与分析工具位于仓库的 warehouse/stock/。 股票元信息和可用代码清单统一保存在公开的 quant/daily.json 中; list_symbols() 读取该文件,因此不需要 OSS 的目录枚举权限。

发布

在仓库根目录执行发布脚本。默认升级补丁版本,随后构建、隔离验证并上传到 PyPI:

packages/publish_maoxianyong.sh

也可以指定版本升级类型:

packages/publish_maoxianyong.sh minor
packages/publish_maoxianyong.sh major

如果上传失败但版本号已经升级,使用当前版本重试,避免再次增加版本号:

packages/publish_maoxianyong.sh current

脚本会在发布前请求确认,并隐蔽读取以 pypi- 开头的 PyPI API Token。脚本不会自动提交 Git。

Metadata

Release files for maoxianyong 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for maoxianyong 0.2.1
File Size Uploaded Provenance Actions
maoxianyong-0.2.1.tar.gz 5.6 kB Without provenance Details for maoxianyong-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for maoxianyong 0.2.1
File Interpreter ABI Platform Actions
maoxianyong-0.2.1-py3-none-any.whl Python 3 none any Details for maoxianyong-0.2.1-py3-none-any.whl

Total release size: 10.8 kB

Release files / maoxianyong-0.2.1.tar.gz

Download URL maoxianyong-0.2.1.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d47c6745e8324dc23ac840967f3ba19259e2ae3560bf80d800f83ae876b81f03
BLAKE2b-256 checksum
How to use checksums
9a1c43b2d2fa32c91cd835920f3ac2ea78020b35abe2e700c5f4fa2ebe2e9c15
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.12

Release files / maoxianyong-0.2.1-py3-none-any.whl

Download URL maoxianyong-0.2.1-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5adb7802ae9a89f3a07b185ea62359de4aa1640b3517a1755e305bb2bae9b896
BLAKE2b-256 checksum
How to use checksums
f1227bc64e06edd212d7be5c6b69314ad13cafa4c872b452cd3e308c88689a8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.12

Security for maoxianyong 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page