Pure-local Python quant trading framework covering stock, futures and options data, backtesting, simulated and live trading, and multi-account management.
- Stars
- 23,236
- Forks
- 3,564
- Open issues
- 6
- Last commit
- yesterday
Repolode describes open-source projects and does not give investment advice. Trading and investing can lose money: assess the risk yourself and follow the laws where you live before using this project.
What is it?
AKShare is a Python library for fetching financial data. Each data source is exposed as a function, so retrieving a dataset such as daily stock history typically takes a single call that returns a pandas DataFrame. Coverage includes Chinese A-shares, futures, options, bonds, funds, currencies, and macroeconomic indicators, along with some international markets.
The library includes an offline interface search that matches keywords against its registry of interfaces, and each interface can be inspected for its parameters and output columns. The project targets Python 3.11 and above and is installed from PyPI with pip or uv. Its companion project AKTools exposes the same interfaces as an HTTP API and as an MCP server for AI assistants.
The data is sourced from public websites and exchanges, and the project's own statement notes it is intended for academic research and reference only, not as investment advice, and that some interfaces may be removed over time.
Key features
- 01Fetches market data with one function call that returns a pandas DataFrame.
- 02Covers A-shares, futures, options, bonds, funds, currencies, and macro indicators.
- 03Offers offline keyword search over its interface registry, with parameter and output details per interface.
- 04Installs from PyPI via pip or uv.
- 05Companion AKTools project provides an HTTP API and MCP server.
Use cases
- Pulling historical A-share or futures price data into a Python quant or backtesting workflow.
- Building financial data analysis or research notebooks for academic work.
- Letting an AI assistant query Chinese market data through the MCP server.
- Feeding macroeconomic or bond indicators into dashboards and reports.
Quick start
- 1
Install AKShare with uv (recommended)
uv pip install akshare --upgrade - 2
Or install with pip
pip install akshare --upgrade - 3
Fetch A-share daily price data in Python
python -c "import akshare as ak; print(ak.stock_zh_a_hist(symbol='000001', period='daily', start_date='20170301', end_date='20231022', adjust=''))"
Things to know
- Data is provided for academic research and reference only, not investment advice.
- Some data interfaces may be removed due to uncontrollable factors from upstream sources.
- Requires Python 3.11 or higher (64-bit).
In collections
Topics
FAQ
- What is akshare?
- A Python library that wraps many Chinese and global financial data sources into simple, one-line data-fetching functions. AKShare is a Python library for fetching financial data. Each data source is exposed as a function, so retrieving a dataset such as daily stock history typically takes a single call that returns a pandas DataFrame. Coverage includes Chinese A-shares, futures, options, bonds, funds, currencies, and macroeconomic indicators, along with some international markets.
- Is akshare free to use? What license does it have?
- akshare is open source under the MIT license. Check the license terms before using it in commercial products.
- Is akshare still maintained?
- Actively maintained. The last commit to akshare was on Nov 6, 2026.
- What can I use akshare for?
- Pulling historical A-share or futures price data into a Python quant or backtesting workflow. Building financial data analysis or research notebooks for academic work. Letting an AI assistant query Chinese market data through the MCP server. Feeding macroeconomic or bond indicators into dashboards and reports.
- How do I install akshare?
- Install AKShare with uv (recommended): uv pip install akshare --upgrade Or install with pip: pip install akshare --upgrade Fetch A-share daily price data in Python: python -c "import akshare as ak; print(ak.stock_zh_a_hist(symbol='000001', period='daily', start_date='20170301', end_date='20231022', adjust=''))"
- Where can I get akshare?
- The source code and installation instructions are on GitHub: https://github.com/akfamily/akshare
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Self-hosted Chinese A-share data lake in Parquet with 55 daily-updated datasets, point-in-time semantics, and a read-only MCP server for AI agents.
An open-source C++/Python quantitative trading framework for strategy research, portfolio construction and backtesting on A-share data.
HTTP API and MCP server that exposes AKShare's financial data interfaces to any language or AI assistant like Claude and Cursor.
Open-source Python data platform that connects financial and other data sources and exposes them to Python, Excel, AI agents and REST APIs.
Python SDK for fetching Chinese A-share stock, fund, bond and sentiment market data from multiple public sources, aimed at personal quant trading.