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.4.tar.gz (82.8 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.4-py3-none-any.whl (81.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for jh_fin_data-0.1.4.tar.gz
Algorithm Hash digest
SHA256 f1c6fef3d23fe21c5727b76c37217c7f07133f38cc05fa119428191a3d5d1935
MD5 7d14cdf2b7e7bb52b69dfb7afa029ccf
BLAKE2b-256 04e117d9f02c4992f8bdd310f39234fe340d3cac0c95e921ac096f26cf92d43e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jh_fin_data-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 46dbbcdeecaee4948b56d982bfc680b499afb0769fb13763df2f4e63cb1a52c9
MD5 0f28d9950e842a30369ca68896cfe75b
BLAKE2b-256 21cbf4987d5140a729ffe8d767f2ed640851b011f1bd15b8908d52fa87723cc6

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