efinance
A finance tool to get stock,fund and futures data base on eastmoney
Decision gist · record as of 2026-08-14
Yes, if you need Chinese market data and accept the learning-only disclaimer. The package is actively maintained, has no security issues, installs easily, and integrates well with pandas workflows. If you require commercial-grade data reliability or non-Chinese markets as a primary use case, verify eastmoney's stability and coverage first, or consider a dedicated financial data API.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires network access to fetch data from eastmoney; rate limiting or connection timeouts may occur during heavy use.
- Low friction install with a pure-Python wheel.
- Active maintenance—last commit 2026-07-17, 28 days since release.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial use, modification, and redistribution with attribution. However, the package itself carries a disclaimer stating it is for learning and exchange only, not for commercial purposes—users should review this restriction against their intended use.
last release 2026-07-17 (28 days) · last repo commit 2026-07-17 · 3,935 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 341,759 downloads/mo, #7,400 on PyPI
Alternatives
Verify before relying
import efinance as ef
stock_code = '600519'
df = ef.stock.get_quote_history(stock_code)
print(df.head())- Whether the eastmoney data source is stable and whether rate-limiting is enforced or documented.
- Whether non-Chinese market data (e.g., AAPL, MSFT) shown in examples is consistently available or a special case.
- Whether the package actively maintains its data source connection or if it has experienced outages.
What it is and what it does
efinance is a Python library that retrieves historical and intraday price data for Chinese stocks, ETFs, funds, and futures from eastmoney, a major Chinese financial data provider. It wraps HTTP requests to eastmoney's endpoints and parses the responses into pandas DataFrames, making it straightforward to pull candlestick data at various frequencies (daily, 5-minute, etc.) for use in backtesting, analysis, or live trading systems.
The package supports lookups by stock code (e.g., '600519' for a Shanghai stock) or by name, and also handles international tickers like AAPL and MSFT. Its eight runtime dependencies—requests, pandas, beautifulsoup4, tqdm, retry, multitasking, jsonpath, and rich—handle HTTP transport, data parsing, progress display, and retry logic. The library is actively maintained and carries no known security vulnerabilities, though it explicitly disclaims commercial use in its documentation.
Use it for
- Backtest trading strategies on Chinese A-shares by pulling years of daily OHLCV data for a given stock code.
- Monitor intraday price movements at 5-minute intervals for live trading or real-time dashboards.
- Fetch ETF historical data to analyze sector or thematic fund performance over time.
- Build a data pipeline that refreshes fund and futures quotes for a personal investment tracking system.
- Compare historical prices across multiple stocks or ETFs in a single pandas DataFrame for correlation analysis.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need Chinese market data and accept the learning-only disclaimer.
The package is actively maintained, has no security issues, installs easily, and integrates well with pandas workflows. If you require commercial-grade data reliability or non-Chinese markets as a primary use case, verify eastmoney's stability and coverage first, or consider a dedicated financial data API.
Install
efinance on PyPI
Before you install
Low friction install with a pure-Python wheel. Active maintenance—last commit 2026-07-17, 28 days since release. Eight runtime dependencies (requests, pandas, beautifulsoup4, etc.) are all widely used and stable. No known vulnerabilities as of 2026-08-14.
Requires network access to fetch data from eastmoney; rate limiting or connection timeouts may occur during heavy use.
License in practice
MIT license permits commercial use, modification, and redistribution with attribution. However, the package itself carries a disclaimer stating it is for learning and exchange only, not for commercial purposes—users should review this restriction against their intended use.
Quickstart
import efinance as ef
stock_code = '600519'
df = ef.stock.get_quote_history(stock_code)
print(df.head())
Verify before relying
- Whether the eastmoney data source is stable and whether rate-limiting is enforced or documented.
- Whether non-Chinese market data (e.g., AAPL, MSFT) shown in examples is consistently available or a special case.
- Whether the package actively maintains its data source connection or if it has experienced outages.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 8 packagesrequeststqdmpandasretrymultitaskingjsonpathrichbeautifulsoup4 |
| Maintenance | Actively maintained 28 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 341,759 / month, #7,400 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming 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 |
Evidence: efinance-0.5.9-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “fund price history api”
- efinanceFetches historical and real-time stock, fund, and futures price data…
- imfpDownloads economic data from the International Monetary Fund's SDMX…
- keepaQuery Amazon product data and pricing history from the Keepa API,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Information Analysis packages
A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.
pyarrow provides Python bindings to Apache Arrow's C++ libraries for efficient columnar data processing, serialization, and interoperability with pandas, NumPy, and other Python ecosystem tools.
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
Snowpark Python provides APIs to query and process data directly in Snowflake without moving data to your local system, with support for both native Snowpark and pandas-compatible interfaces.
Install it if you use Snowflake and want to process data without moving it to your application layer.
See also finance-datareader · akshare · yahooquery · baostock · sec-edgar-downloader · tdxpy · finlab · alpha-vantage · tickflow · pandas_market_calendars