Comparison
baostock vs pytdx vs tushare vs yfinance
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
A tool for obtaining historical data of China stock market
Actively maintained. Last release 2 months ago. A safe choice.
$
pip install baostockA Python Interface to TDX protocol
Archived. The repository is read-only: no more fixes or releases will come.
$
pip install pytdxA utility for crawling historical and Real-time Quotes data of China stocks
Maintained. Last release 8 months ago.
$
pip install tushareDownload market data from Yahoo! Finance API
Actively maintained. Last release 4 weeks ago, commits in 23 of the last 26 weeks. A safe choice.
$
pip install yfinanceIn short
- pytdx is archived: avoid it for new projects.
- yfinance is the most used: 16.5M downloads a month, 58× more than baostock.
- yfinance also has the best Pythie’s Index (90).
- Safe default for a new project: yfinance.