jh_data
jh_data是一个免费,高性能,简洁易用的金融数据获取框架。
- 官网&API申请: https://data.jiuhuang.xyz
- 文档地址: https://doc.jiuhuang.xyz
亮点
- 丰富的数据源:兼容akshare和tushare多种数据类型,支持获取A股、基金、宏观等数据
- 统一的数据接口:通过
DataTypes枚举类统一管理数据类型,输出字段名标准化为英文字段名 - 多时间颗粒度支持:支持日、周、月级别数据,以及分钟级实时数据
- 多数据接口兼容:支持 JHData、akshare、tushare 三种接口方式
快速开始
安装
uv安装(推荐)
uv add jh-data
# 或者uv pip install -U jh-data
pip安装
pip install -U jh-data
数据获取
jh_data 支持三种数据获取方式:
方式一:JHData 直接获取
from jh_data.data import JHData, DataTypes
jh = JHData()
# 获取股票日线数据(前复权)
stock_price = jh.get_data(
DataTypes.AK_STOCK_ZH_A_HIST_QFQ,
symbol="000001",
start="2025-01-01",
end="2025-01-10",
)
print(stock_price)
方式二:akshare 兼容接口
from jh_data.data_providers import akshare as ak
# akshare 风格:使用 start_date/end_date/adjust 参数
stock_price = ak.stock_zh_a_hist(
symbol="000001",
start_date="20250101",
end_date="20250110",
adjust="qfq"
)
print(stock_price)
方式三:tushare 兼容接口
from jh_data.data_providers import tushare as ts
# tushare 风格:使用 ts_code/start_date/end_date 参数
daily_data = ts.daily(
ts_code="000001.SZ",
start_date="20250101",
end_date="20250110"
)
print(daily_data)
License
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.
Metadata
Release files for jh-fin-data 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jh_fin_data-0.1.6.tar.gz | 82.9 kB | Without provenance | Details for jh_fin_data-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jh_fin_data-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for jh_fin_data-0.1.6-py3-none-any.whl |
Total release size: 164.0 kB
Release files / jh_fin_data-0.1.6.tar.gz
| Download URL | jh_fin_data-0.1.6.tar.gz |
|---|---|
| Size | 82.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f384aa47a0eb0129370d5a80137e3c22ba376cc03036653b3c925f1b452a88d3
|
|
BLAKE2b-256 checksum How to use checksums |
6c4618aa01f9321bda6199cc22afe24fb6345bed36a96471680b49fa51fe2564
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.14
|
Release files / jh_fin_data-0.1.6-py3-none-any.whl
| Download URL | jh_fin_data-0.1.6-py3-none-any.whl |
|---|---|
| Size | 81.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b7e709653d0d5fadca5075a6ac7656bce3494ae3f52cf64c1518d4d4a387a79a
|
|
BLAKE2b-256 checksum How to use checksums |
0a2e758b66d5cdde00a313565ce5b627a499fe8ef49c07e6125176691cd813f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.14
|
Security for jh-fin-data 0.1.6
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.