tdxpy
通达信数据读取接口.
What it is and what it does
TdxPy is a Python wrapper around the Tongdaxin (通达信) market data protocol, allowing developers to retrieve stock quotes and trading data from Tongdaxin servers without needing to use compiled libraries or platform-specific binaries. It is a maintained fork of the older pytdx project, with bug fixes and cross-platform support for Windows, macOS, and Linux.
The package depends only on pandas and works with Python 3.8 through 3.12. It is designed for personal research and learning rather than production trading systems; the author explicitly disclaims responsibility for commercial use and advises institutions not to rely on it. The dormant maintenance status (no releases in 887 days) means bug fixes and compatibility updates are unlikely to arrive quickly.
Use it for:
- Retrieve historical stock price data from Tongdaxin servers for backtesting trading strategies in research notebooks.
- Build a lightweight data pipeline to pull real-time quotes into pandas DataFrames for technical analysis.
- Access Tongdaxin market data in a pure-Python environment without installing platform-specific trading software components.
- Prototype a market data aggregator that combines Tongdaxin quotes with other data sources for personal portfolio tracking.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
TdxPy provides a pure-Python interface to read market data from Tongdaxin (通达信) trading software servers, without requiring compiled libraries or platform-specific binaries.
Yes, if you need Tongdaxin market data access in pure Python and have a running Tongdaxin server available. No, if you expect active maintenance or plan commercial use—the dormant status and pre-alpha classification mean unresolved issues are unlikely to be fixed, and the author's disclaimer forbids commercial deployment. Suitable only for personal research and learning.
Install
tdxpy on PyPI
pip
pip install tdxpyuv
uv add tdxpypoetry
poetry add tdxpyInstalling tdxpy
Before you install
Low install friction with a single runtime dependency (pandas). However, the project is dormant—last release was 887 days ago—and carries a pre-alpha development status, suggesting limited ongoing maintenance and potential unresolved issues.
License in practice
MIT license permits commercial use, modification, and distribution with minimal restrictions. However, the package's own disclaimer explicitly states it is for learning and research only and should not be used for commercial purposes, creating a tension between the permissive license and the author's stated intent.
Quickstart
pip install tdxpy
import tdxpy
# Requires connection to a Tongdaxin server instance
# Typical usage: client = tdxpy.TdxClient(); data = client.get_quotes(...)
Requires access to a running Tongdaxin trading software server or compatible market data service; cannot function as a standalone data source.
Verify before relying
- Whether the Tongdaxin server endpoints remain stable and accessible, given the dormant maintenance status.
- Current compatibility with modern versions of pandas and whether dependency updates have been tested.
- Whether the pre-alpha status reflects incomplete feature coverage or simply conservative versioning.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.8,<4.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pandas |
| Maintenance | dormant — 887 days since the last release |
| First released | |
| Downloads | 93,739/month — #13,365 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: tdxpy-0.2.7-py3-none-any.whl
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
mootdxReads market data from Tongdaxin (a Chinese…
permissive · top 15,000 on PyPI
robin-stocksProvides a Python interface to the Robinhood,…
permissive · top 15,000 on PyPI
efinanceFetches historical and real-time stock, fund,…
permissive · top 15,000 on PyPI
shioajiShioaji is a trading API for Taiwan's financial…
unclear · top 15,000 on PyPI
akshareAKShare fetches financial market data (stocks,…
permissive · top 5,000 on PyPI
metatrader5Connects Python to MetaTrader 5 Terminal to…
permissive · top 15,000 on PyPI
baostockBaoStock retrieves historical China stock…
permissive · top 15,000 on PyPI
tickflowTickFlow is a Python client for accessing…
permissive · top 15,000 on PyPI
tushareFetches historical and real-time Chinese stock…
permissive · top 15,000 on PyPI
tastytradeAn asynchronous Python SDK for Tastytrade's…
permissive · top 15,000 on PyPI