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.2.tar.gz
(19.2 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.2-py3-none-any.whl
(22.5 kB
view details)
File details
Details for the file dayquant-0.3.2.tar.gz.
File metadata
- Download URL: dayquant-0.3.2.tar.gz
- Upload date:
- Size: 19.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29a88ff487c89c3407a1bcc101f4e511f6e7e5e5b85012cfbd7d709789dd976b
|
|
| MD5 |
f9c643a36fa8e1072914b97a081ae445
|
|
| BLAKE2b-256 |
53093cd4d462e723de06075af8d2be15d726697b213ddebb86bf41c24b491f08
|
File details
Details for the file dayquant-0.3.2-py3-none-any.whl.
File metadata
- Download URL: dayquant-0.3.2-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
181f0bb8ca7a5f2f628fbe71d0d3160e5c489092428ed28605ff74aa17e76379
|
|
| MD5 |
7fcdd6ddf2ab4a16257c13ea59585eed
|
|
| BLAKE2b-256 |
8dd9a0de0934f0f95193607792d186b4948ac0daa30a9c0d43e1efd135073cd8
|