Skip to main content

finclaw-data-sdk

A 股量化数据 HTTP 客户端。安装后 from finclaw_data_sdk import QuantClient,只依赖 pandas,不含拉取与 ClickHouse 业务代码。

pip install finclaw-data-sdk

本地开发也可 pip install -e sdk。

from finclaw_data_sdk import QuantClient, cols

c = QuantClient("http://127.0.0.1:8000")  # 若启用鉴权:username="root", password="..."
stocks = c.stocks(list_status="L", q="茅台")
bars = c.daily_bar(code="600519.SH", start="20240801", end="20240805")
factor = c.stock_factor_pro(code="600519.SH", start="20240801", end="20240805", fields=cols.stock_factor_pro.PE_TTM)
income = c.income(code="600519.SH", start="20230101", end="20231231")
bs = c.balancesheet(code="600519.SH", limit=8)
cf = c.cashflow(code="600519.SH", limit=8)
fina = c.fina_indicator(code="600519.SH", fields=cols.fina_indicator.ROE)
buyback = c.repurchase(code="600519.SH", start="20240101", end="20241231")
indexes = c.index_basic(market="CSI", q="沪深300")
univ = c.constituent_indexes()
hs300 = c.index_weight(index_code="000300.SH")  # 最新月度成分;入库代码 399300.SZ

证券代码列是 code(600519.SH)。也可传 6 位数字或 sh.600519,服务端会展开。日期参数为 YYYYMMDD 或 YYYY-MM-DD,区间两端包含。

kline() 是 daily_bar() 的别名(未复权)。复权价和估值因子用 stock_factor_pro()(close_qfq / pe_ttm 等)。fina() 是 fina_indicator() 的别名。indexes() 是 index_basic() 的别名。index_constituents() 是 index_weight() 的别名(月度快照;只传 end 为 as-of)。

需先启动本仓库的 python -m finclaw_data serve。

Metadata

Release files for finclaw-data-sdk 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for finclaw-data-sdk 0.2.0
File Size Uploaded Provenance
finclaw_data_sdk-0.2.0.tar.gz 6.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for finclaw-data-sdk 0.2.0
File Interpreter ABI Platform
finclaw_data_sdk-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.3 kB

Release files / finclaw_data_sdk-0.2.0.tar.gz

Download URL finclaw_data_sdk-0.2.0.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
dad9235ca69dc0ee19bdd239bb6cdbbff940bae1069ba1ffe7bcdcd4242421c7
BLAKE2b-256 checksum
How to use checksums
1a5ab92ce54d0b103c641c3dc9abea4ba00b65d1fc37751c2a3ce9506714e108
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / finclaw_data_sdk-0.2.0-py3-none-any.whl

Download URL finclaw_data_sdk-0.2.0-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b074ea6a8ca00c0d537cb405da16e76e003ea8e408c735352c4709708130571
BLAKE2b-256 checksum
How to use checksums
56afa4adda2a31acbb09aa7a9dcfa1b7a4a9d2a4683806259a312f4e9b8736ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for finclaw-data-sdk 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page