Skip to main content

jh finance data provider sdk

Project description

banner

jh_data

jh_data是一个免费,高性能,简洁易用的金融数据获取框架。

亮点

  • 丰富的数据源:兼容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.

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

jh_fin_data-0.1.6.tar.gz (82.9 kB view details)

Uploaded Source

Built Distribution

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

jh_fin_data-0.1.6-py3-none-any.whl (81.1 kB view details)

Uploaded Python 3

File details

Details for the file jh_fin_data-0.1.6.tar.gz.

File metadata

  • Download URL: jh_fin_data-0.1.6.tar.gz
  • Upload date:
  • Size: 82.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for jh_fin_data-0.1.6.tar.gz
Algorithm Hash digest
SHA256 f384aa47a0eb0129370d5a80137e3c22ba376cc03036653b3c925f1b452a88d3
MD5 d9b2f3353d038afa5ab1962575700933
BLAKE2b-256 6c4618aa01f9321bda6199cc22afe24fb6345bed36a96471680b49fa51fe2564

See more details on using hashes here.

File details

Details for the file jh_fin_data-0.1.6-py3-none-any.whl.

File metadata

File hashes

Hashes for jh_fin_data-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b7e709653d0d5fadca5075a6ac7656bce3494ae3f52cf64c1518d4d4a387a79a
MD5 81dccea02430c098af256fe46731717b
BLAKE2b-256 0a2e758b66d5cdde00a313565ce5b627a499fe8ef49c07e6125176691cd813f5

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