efinance is a free open-source Python package for fetching stock, fund, bond, and futures market data. It supports pip, Docker, and source installs for personal trading-system workflows.
Overview
efinance is a Python library created to pull Chinese and related market data for individual trading and quant workflows. The author states it is for learning and personal systems, not commercial use.
Stock-related calls cover daily and intraday K-lines, A-share status, dragon-tiger board listings, quarterly performance, and capital flow at daily or minute granularity. Fund APIs return historical net asset values and public holdings. Bond helpers expose convertible bond listings and K-lines. Futures helpers return exchange metadata and historical quotes.
Installation options include pip, Docker, and cloning the source tree for development. Online API documentation is published, and local HTML docs can be built with Sphinx or pdoc. TickFlow is noted as an alternate data source when rate limits or network errors occur.
The scope is data retrieval and examples around stocks, funds, bonds, and futures rather than a hosted trading platform or portfolio application.
Key features
- Stock daily and minute K-line fetchers
- Fund net value and holding queries
- Convertible bond market snapshots
- Futures exchange info and history
- ETF and non-A-share symbol support
- pip, Docker, and source installs
- Published API docs with local build option
- Capital flow and leaderboard helpers
Use cases
- Personal quant research scripts
- Backtesting data preparation
- Monitoring A-share market status
- Analyzing fund and bond listings