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.1.tar.gz
(19.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
dayquant-0.3.1-py3-none-any.whl
(22.4 kB
view details)
File details
Details for the file dayquant-0.3.1.tar.gz.
File metadata
- Download URL: dayquant-0.3.1.tar.gz
- Upload date:
- Size: 19.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
794564622c568b201125abbc5d907621bb6a399fca37fc81dcf61d6f3927bc5f
|
|
| MD5 |
0c990d4248308e3f7c3bb394985d9355
|
|
| BLAKE2b-256 |
148a74ddc61588454f329295ee8672f7073e0491446084f1c1caf42828b61821
|
File details
Details for the file dayquant-0.3.1-py3-none-any.whl.
File metadata
- Download URL: dayquant-0.3.1-py3-none-any.whl
- Upload date:
- Size: 22.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf1e360e4b8a48a6f16daf6eb89edb4faae07d43e5d90a6c0e2c9b3736cfc060
|
|
| MD5 |
2ee65c9d644b24380b412ff36f38894c
|
|
| BLAKE2b-256 |
5b05a300d5d20dc8b655d0892898960c7d4ea02beb56917bbd0c06836fd121f5
|