akshare
What it does
This skill teaches an agent to use AKShare, a free open-source Python library for financial data. It is for analysts and developers who want market data without signing up for a paid service.
When to use it
- ✓When you need historical prices for A-shares, US stocks, Hong Kong stocks or futures.
- ✓When you want free macro or forex data without an API key.
- ✓When you need a fallback data source if another market data provider is unavailable.
Skill link
https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/akshare/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Pull the daily prices for a Hong Kong stock over the last two years and show me the monthly trend.”
5 new skills a week. 1 minute to read.
How it works
The agent installs the AKShare Python library and calls the right function for the market you need, such as daily prices for A-shares or US stocks. It uses adjusted prices where appropriate and returns the data in a table it can analyze.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Overview
AKShare is a completely free, open-source Python financial data library. No registration or API key required. It aggregates data from public sources (Sina, East Money, etc.) covering Chinese and global markets.
- GitHub: https://github.com/akfamily/akshare (18k+ stars)
- Install:
pip install akshare
Quick Start
import akshare as ak
# A-share daily OHLCV (前复权)
df = ak.stock_zh_a_hist(symbol="000001", period="daily",
start_date="20240101", end_date="20260101", adjust="qfq")
# US stock daily
df = ak.stock_us_hist(symbol="105.AAPL", period="daily",
start_date="20240101", end_date="20260101", adjust="qfq")
# HK stock daily
df = ak.stock_hk_hist(symbol="00700", period="daily",
start_date="20240101", end_date="20260101", adjust="qfq")
Top 10 High-Frequency Interfaces
A-shares
| Function | Description | Key Params |
|---|---|---|
stock_zh_a_hist() |
A-share OHLCV | symbol, period, start_date, end_date, adjust |
stock_zh_a_spot_em() |
Real-time A-share quotes | (none) |
stock_individual_info_em() |
Stock basic info | symbol |
stock_zh_a_hist_min_em() |
Intraday bars | symbol, period(1/5/15/30/60) |
US / HK
| Function | Description | Key Params |
|---|---|---|
stock_us_hist() |
US stock OHLCV | symbol (e.g. "105.AAPL"), period, start_date, end_date |
stock_hk_hist() |
HK stock OHLCV | symbol (e.g. "00700"), period, start_date, end_date |
Macro / Forex / Futures
| Function | Description |
|---|---|
macro_china_gdp() |
China GDP data |
macro_china_cpi() |
China CPI data |
futures_main_sina() |
Futures main contract quotes |
currency_boc_sina() |
BOC forex rates |
Column Names
AKShare returns Chinese column names by default:
| Chinese | English | Description |
|---|---|---|
| 日期 | date | Trade date |
| 开盘 | open | Open price |
| 最高 | high | High price |
| 最低 | low | Low price |
| 收盘 | close | Close price |
| 成交量 | volume | Volume |
| 成交额 | amount | Turnover |
| 涨跌幅 | pct_change | % change |
| 换手率 | turnover_rate | Turnover rate |
Date Format
- Input:
YYYYMMDDstring (e.g."20240101") - Output:
日期column as string, convert withpd.to_datetime()
Symbol Format
- A-shares: pure digits
"000001"(no .SZ suffix) - US stocks:
"105.AAPL"(NASDAQ prefix 105),"106.BABA"(NYSE prefix 106) - HK stocks:
"00700"(5-digit zero-padded)
Built-in Loader
The project has a built-in AKShare DataLoader at backtest/loaders/akshare_loader.py. When backtesting, the runner automatically falls back to AKShare when tushare/yfinance are unavailable.
Reference Docs
For less common interfaces, see the references/ subdirectory or the official docs at https://akshare.akfamily.xyz/
FAQ
Does it need a paid account?
No. AKShare is free and needs no registration or API key.
Where does the data come from?
It collects public data from sources such as Sina and East Money.
Can it fill in when other sources fail?
Yes. The skill lists it as a primary fallback when other finance data sources are unavailable.
Details
Original description by the author
AKShare financial data aggregator (18k+ stars). Free, no API key. Covers A-shares, US, HK, futures, macro, forex. Primary fallback for tushare and yfinance.
repo: HKUDS/Vibe-Trading
Popularity
- GitHub stars
- 37k
- Ranking position
- #7496
- License
- MIT
- Updated
- 11/1/2026
Comments
- …
More skills from this repository
vibe-trading
37kGives your agent a full finance research toolkit, covering backtests, factor analysis, options pricing and market data across many markets.
adr-hshare
37kShows your agent how to compare the price of a Chinese company listed in several markets, such as a US ADR and a Hong Kong share.
alpha-zoo
37kLets your agent browse a library of ready-made stock factors and test how well a whole set of them predicts returns on a chosen market.
asset-allocation
37kTeaches your agent portfolio allocation methods, such as mean-variance, Black-Litterman and risk budgeting, and how to apply them with the built-in optimizers.
Similar skills
gitcrawl
394kLets your agent search a saved archive of GitHub issues and pull requests, group duplicates, and check their current status on GitHub.
slacrawl
394kLets your agent search and count messages in a local Slack archive, check how fresh that archive is, and refresh it when needed.
goplaces
394kHelps your agent search for places, get their details and reviews, and resolve place names using Google Places, with JSON output for scripts.