Analysis updated 2026-05-18
Parse large volumes of Chinese A-share historical price files far faster than pure Python
Pull real time five-level quotes and tick data for multiple stocks at once
Calculate correctly adjusted prices after stock splits, dividends, or rights issues
Swap an existing tdxpy-based Python project onto a faster backend with minimal code changes
| jiangtaovan/tdxrs | codeaashu/agents-are-thinking | forgeailab/forge | |
|---|---|---|---|
| Stars | 15 | 15 | 15 |
| Language | Rust | Rust | Rust |
| Setup difficulty | moderate | easy | moderate |
| Complexity | 3/5 | 2/5 | 3/5 |
| Audience | data | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires Rust 1.83+ and maturin to build, Windows builds need an extra MSYS2 dlltool step.
tdxrs is a Rust rewrite of the parsing engine behind TDX, a data format and protocol used by Chinese stock market software to store and transmit price history. The project exists to make reading and parsing this financial data much faster than the original Python library it replaces, called tdxpy, while keeping the same function names and calling style so existing Python code can switch over with minimal changes. The library exposes its Rust core to Python through PyO3 and maturin, so you install and use it as a normal Python package even though the actual parsing work runs as compiled Rust underneath. Reported benchmarks show roughly nine to eleven times faster local file parsing compared to the pure Python version, and about thirty to fifty percent faster network requests for live quotes and historical bars. Functionally, tdxrs can fetch daily and minute-level candlestick data, real time five-level quotes, tick by tick trade records, security listings, financial statement figures, and dividend or rights adjustment history, either over the network from a TDX server or by reading local .day, .lc5, .lc1, and block data files directly from disk. It also performs the price adjustment math needed to account for stock splits, dividends, and rights issues on the client side, since the raw server data does not include this calculation. The project offers four different client types depending on your use case: a pooled client with retries and caching for normal sequential requests, a client that opens a fresh connection per request for high concurrency work, a specialized client for large financial data files, and an async client built on Tokio. Output can be returned as Python dictionaries, tuples for speed, or pandas DataFrames. Installation is done through maturin, and it requires Rust 1.83 or newer plus Python 3.8 or newer. The project is released under the MIT license.
A Rust library with Python bindings that parses TDX Chinese stock market data far faster than the original Python tool, while keeping a compatible API.
Mainly Rust. The stack also includes Rust, Python, PyO3.
Free to use, modify, and distribute, including commercially, as long as you keep the copyright notice.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly data.
This repo across BitVibe Labs
Verify against the repo before relying on details.