A Python utility for crawling, cleaning, and storing historical financial data for China stocks and futures.
TuShare is a Python library that provides programmatic access to historical and real-time financial data from Chinese markets, including stocks, futures, and other securities. It handles the entire workflow from data crawling and cleaning to storage, addressing the need for reliable, structured market data among quantitative analysts and data scientists.
Quantitative analysts, algorithmic traders, data scientists, and students focused on Chinese financial markets who require clean, accessible historical and real-time data for backtesting, research, or modeling.
Developers choose TuShare for its extensive coverage of Chinese market data, simple API that returns pandas DataFrames, and active maintenance—offering a free, open-source alternative to commercial financial data providers with a focus on ease of integration into Python-based analysis pipelines.
TuShare is a utility for crawling historical data of China stocks
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Covers stocks, futures, options, and macroeconomic indicators, providing a one-stop shop for Chinese market analysis, as highlighted in the extended financial data features.
All data is returned as pandas DataFrames, enabling immediate integration with standard data analysis workflows, evidenced by the clean API examples in the Quick Start section.
Functions like get_hist_data() are straightforward to call with minimal parameters, reducing the learning curve for developers, as shown in the examples for historical and real-time data.
Regular updates and the introduction of TuShare Pro demonstrate ongoing maintenance and feature additions, with frequent change logs documenting enhancements.
The Pro version splits features, with advanced data or higher quotas potentially behind a paywall, creating confusion and limitations for free users, as indicated by the promotion of tushare.pro.
Documentation is split between the old tushare.org and new tushare.pro sites, making it harder to find up-to-date information, as noted in the README's reference to the微信公众号 for latest docs.
The README cautions against requesting too much historical data at once (e.g., beyond a year) to avoid performance issues, indicating scalability concerns and possible rate limits in the free version.