skillfed

tdxpy

通达信数据读取接口.

tdxpy v0.2.7 93.7K downloads/30d#13,365 on PyPI
Permissive license MIT DORMANT released

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 tdxpy

uv

uv add tdxpy

poetry

poetry add tdxpy

Installing 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

Development Status :: 2 - Pre-AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

tongdaxin market data apitdx trading data interfacechinese stock market datareal-time quote data pythontrading software data connector
market-datachinese-financedormant

More Internet packages