
AKShare
Python library for fetching Chinese and global financial data with simple function calls.
- Stars
- 23.2k
- Forks
- 3.6k
- Licence
- MIT
- Language
- Python
- Last update
- 4 days ago
- Type
- Library
What it is
AKShare is a Python library that gives you functions to download financial data, such as stock price history, bonds, funds and futures, in a few lines of code. It returns the data as tables you can analyze or chart. People use it for academic research and personal financial data analysis, and its README notes the data is for reference only, not investment advice.
- Download daily price history for a China A-share stock with ak.stock_zh_a_hist
- Search for an interface by keyword with ak.search to find the right data function
- Look up parameters and output columns of a single interface with ak.interface_info
- Plot candlestick charts of US stock data together with the mplfinance package
Great for
- Python users doing academic or personal research on Chinese financial markets
- Data analysts who want historical stock price tables without writing scrapers
- Students learning data analysis with real financial data
- Developers who want to feed financial data to other tools or AI assistants via the companion AKTools project
Not ideal for
- Anyone needing guaranteed, licensed, production-grade market data, since the README says some interfaces may be removed and data is for reference only
- Users who do not use Python, unless they run the separate AKTools HTTP service
- Investors looking for ready-made trading advice, since the project explicitly disclaims investment recommendations
How to get it
- 1
Install with a package manager
You'll need: Python 3.11 or higher (64-bit)
Install with pip
pip install akshare --upgradeInstall with uv (recommended by README)
uv pip install akshare --upgrade - 2
Run it
- Install Python 3.11 or higher
- Run the install command with pip or uv
- Open a Python session and run: import akshare as ak
- Call a function such as ak.stock_zh_a_hist(symbol="000001", period="daily", start_date="20170301", end_date="20231022", adjust="") and print the result
- 3
Get the most out of it
- Use ak.search("keywords", limit=5) to discover the right interface name before coding
- Use ak.interface_info("name") to read parameters and output columns for an interface
- Install mplfinance to chart the returned price data as candlesticks
- Use the AKTools project to access the data over HTTP or through an MCP server for AI assistants
Downloads
Strengths
- Simple, one-line function calls to fetch data, as described in the README
- Offline keyword search helps find interface names without network access
- MIT licensed and actively pushed, with a large user base (23,127 stars)
Trade-offs
- Data comes from third-party sources such as Eastmoney, and the README warns some interfaces may be removed for uncontrollable reasons
- Interface search is keyword matching, not semantic search, so you must know roughly what to look for
- Documentation is primarily in Chinese; the README links to a Chinese docs site
How it compares
| Project | Stars | Type | Level | Updated | Best for |
|---|---|---|---|---|---|
| akshare (this) | 23.2k | Library | beginner | 4 days ago | Python users doing academic or personal research on Chinese financial markets |
| awesome-bigdata | 14.7k | Curated list | beginner | 7 days ago | Developers looking for an overview of big data tools to evaluate |
| awesome-public-datasets | 79.9k | Curated list | beginner | 9 days ago | Data analysts looking for a starting point on a new topic |
| llama_index | 52.8k | Library | intermediate | 11 days ago | Python developers building retrieval-augmented generation (RAG) apps over private documents |
| qlib | 49.9k | Library | advanced | 7 days ago | Quant researchers who want a structured ML workflow for stock data |
| Data-Science-For-Beginners | 37.9k | Learning resource | beginner | 16 days ago | Complete beginners who want a guided, week-by-week data science course |
Stats synced from GitHub. The assessment above was drafted with AI from the project's README on 2026-10-29 and may miss recent changes — check the README before relying on a command. MIT licence: free to use, modify and distribute, including commercially, as long as you keep the copyright notice.