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.core_indexes()
hs300 = c.index_daily(code="000300.SH", start="20240801", end="20240805") # 日线入库 000300.SH
members = c.constituent_indexes()
weights = c.index_weight(index_code="000300.SH") # 最新月度成分;入库代码 399300.SZ
st = c.stock_st() # 最新交易日 ST 名单
证券代码列是 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_daily_indexes() 是 core_indexes() 的别名。index_constituents() 是 index_weight() 的别名(月度快照;只传 end 为 as-of)。stock_st() 是 ST 日度快照(不传日期为最新一日)。
需先启动本仓库的 python -m finclaw_data serve。
Metadata
Release files for finclaw-data-sdk 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| finclaw_data_sdk-0.2.1.tar.gz | 7.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| finclaw_data_sdk-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.9 kB
Release files / finclaw_data_sdk-0.2.1.tar.gz
| Download URL | finclaw_data_sdk-0.2.1.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
24332a4e218b452446835a61a484d5d79b9f72b0d0da321e8fe317505bcec46a
|
|
BLAKE2b-256 checksum How to use checksums |
9c61522df4cc8b44bb8570fd9742045416224b89dbfb7063d768f4b0d596ba84
|
| 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.1-py3-none-any.whl
| Download URL | finclaw_data_sdk-0.2.1-py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0004e5b233892d1511a6e60ddf4f19d39ed80a8b2bb8398ed7c157a7699dfbd2
|
|
BLAKE2b-256 checksum How to use checksums |
02485f4800a50fa07f21f5441a21285cf945668e25ffc56d1aa63e4f5d0341ea
|
| 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.1
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.