// the find
waditu/tushare
TuShare is a utility for crawling historical data of China stocks
TuShare is a Python library for pulling Chinese stock market data — historical prices, real-time quotes, fundamentals, futures, and more — and returning it as pandas DataFrames. It targets quant analysts and data students working with A-share markets. The free version is essentially a museum piece; the actual product is now TuShare Pro, a gated API service.
The free-tier API surface is genuinely wide: OHLCV history, tick data, adjusted prices, index constituents, margin trading flows, convertible bonds, and even box office data. The pandas-native return format means you can go from `ts.get_hist_data('600848')` to a backtest in three lines. The adjustment (复权) handling — pre-adjustment, post-adjustment, and none — is explicitly supported rather than left to the caller. The Pro client (`tushare/pro/client.py`) adds a token-based API layer that's clean enough to use.
The free version is dead. Data sources it scraped (Sina Finance, Netease) have broken or rate-limited these endpoints repeatedly since 2018, and the last meaningful commit was March 2024 with no functional fixes. If you install it today and call `get_today_all()`, expect errors, not data. The Pro version requires registration and a points-based quota system that isn't explained anywhere in this repo — the README just points you to a separate website. There are also no async interfaces anywhere; bulk pulls on hundreds of symbols will block your thread and hit rate limits in ways you'll have to manage yourself.