Skip to main content

dayquant

Token 鉴权的行情 / 财务数据 Python 客户端:本地缺失时自动从服务器增量拉取 parquet,再用 DuckDB 查询,返回 pandas DataFrame。

安装

pip install dayquant

快速开始

import dayquant as dq

cli = dq.create_client("YOUR_TOKEN", "/path/to/data_root")
df = cli.fetch_stock_daily(
    stock_code="000001.SZ",
    start_date="20240101",
    end_date="20240131",
)
print(df.head())

本地没有对应数据时,会自动按查询范围从服务器下载后再返回结果。

也可主动下载:

cli.download_all()                              # 全量增量
cli.download("stock_daily", "stock_income")     # 按接口名

环境变量(可选)

变量 说明
DAYQUANT_SERVER 下载服务地址
DAYQUANT_DATA_ROOT 默认数据根目录(仍建议在 create_client 中显式传入)
DAYQUANT_MAX_ROWS 单次查询最大行数,默认 500000

要求

  • Python >= 3.10
  • 依赖:duckdb、pandas、requests、tqdm、python-dotenv

更完整的接口说明见 usage/ 目录(每个接口一份独立文档),或包内 dayquant/README.md

作者与联系

项目 信息
作者 dayquant
邮箱 info@dayquant.com
官网 https://www.dayquant.com

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dayquant-0.3.3.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

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

dayquant-0.3.3-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file dayquant-0.3.3.tar.gz.

File metadata

  • Download URL: dayquant-0.3.3.tar.gz
  • Upload date:
  • Size: 19.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.11

File hashes

Hashes for dayquant-0.3.3.tar.gz
Algorithm Hash digest
SHA256 f94aac951c70e23b553db85e255759db990b0029be41a0197cef7e6c2c209165
MD5 a7766ba125a4b7017aeb8ee46ae2e53e
BLAKE2b-256 da9ef22d7f632d3897d44cd7b35b2cdccf385dc5268bade029ec5414056c70eb

See more details on using hashes here.

File details

Details for the file dayquant-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: dayquant-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 22.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.11

File hashes

Hashes for dayquant-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 539138e9b8c0ea5e95695e3943995e729d4cd8a7ed44f6f0e16b584d73c76cfd
MD5 557f026f81ac802cada7733ad1f18918
BLAKE2b-256 470cdf4d12ce8a9f48ba4aa5a7886fdf9e7f946dd5f054c71f12114d36069b02

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 Sentry Error logging StatusPage Status page