Local Quant data engine for A-share daily, intraday K-lines and ETF data with local synchronization, caching,权权, batch queries, backtesting and indicator calculations. Supports Python/HTTP/Excel/HTML/MCP interfaces and runs entirely on local data.
Collecting history — the radar snapshots this repo daily. The trend line appears after 3 days of data (2 so far).
What it is
free-stockdb is a local quantitative data engine for A-share daily K, intraday K, and ETF minute/tick data. It performs incremental synchronization, data cleaning, forward/reverse adjustment, batch querying, and indicator calculations locally. It exposes multiple access methods (Python SDK, HTTP API, Excel/WPS, HTML, and MCP) and stores data on disk to avoid remote API dependencies.
How it works
The system synchronizes data locally, then uses a built-in C++ time-series engine to serve queries and calculations without remote calls. It provides get_data(), zb.get(), and bk.get() interfaces for data retrieval and indicator calculations. Data can be accessed via Python SDK, HTTP API, Excel/WPS macros, HTML pages, or MCP. It supports local storage with incremental updates and optional networked data sources via sync_url.txt or --source.
Getting started
Windows users can download from Releases. The README describes running a data update tool, syncing to ./data, and starting stockdb, then querying locally via Python/HTTP/Excel/WPS/HTML/MCP. Example usage blocks show how to call get_data(), zb.get(), and bk.get() with suitable parameters. The README includes a Python example for get_data and indicator calls:
result = get_data(
code=7000_codes,
start=any_start,
end=any_end,
frequency=any_frequency,
fq=any_fq,
fields=any_fields,
as_df=False/True
)
result = zb.get(
name="ma,kdj,macd,....",
codes=7000_codes,
start=any_start,
end=any_end,
frequency=any_frequency,
fq=any_fq,
n=["5,10,20", None, "12,26,9"],
cross="with_value"
)
result = bk.get(
x=code_or_board_or_codes,
category=0-3,
fields="code,name,symbols"
)
Recent releases
Latest release: 测试版本0.2.0 free-stockdb v0.2.0 — 本地 A 股日K/分钟K 数据引擎 (2026-07-19). The release notes describe incremental synchronization, cleaning, forward/reverse adjustments, batch queries, and local indicator calculations. It also outlines intended users and data access options. The Windows download link is provided in the README.
Traction
Stars: 553. Forks: 85. Open issues: 1.
Behind the repo
No startup/company-specific details are provided in the excerpt beyond repository metadata and licensing. The project uses MIT license and includes a C++ time-series engine under cpp/ with CMake build instructions.
Caveats
License: MIT. Created: 2026-05-08. Last push: 2026-07-19. Data storage relies on local disk (Zstd compressed). Service defaults to listening on 127.0.0.1:7899. Requires CMake 3.14+, C++17 compiler, libcurl, and OpenSSL for building. README notes Windows prebuilt releases exist.






