akshare
- Repo stars 9,792
- Author updated Live
- Author repo Vibe-Trading
- Domain
- Data
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @HKUDS · no license declared
- Token usage
- Lean
- Setup complexity
- Guided setup
- External API key
- Required · Vendor-specific
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- Python
- Permissions
-
- Read-only
- Write / modify
- Network behavior
- External requests
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: akshare
description: AKShare financial data aggregator (18k+ stars). Free, no API key. Covers A-shares, US, HK, futur…
category: data
runtime: Python
---
# akshare output preview
## PART A: Task fit
- Use case: AKShare financial data aggregator (18k+ stars). Free, no API key. Covers A-shares, US, HK, futures, macro, forex. Primary fallback for tushare and yfinance. 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 globa….
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “Overview / Quick Start / Top 10 High-Frequency Interfaces” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “AKShare financial data aggregator (18k+ stars). Free, no API key. Covers A-shares, US, HK, futures, macro, forex. Primary fallback for tushare and yfinance. 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 globa…”.
- **02** When the source has headings, the agent prioritizes “Overview / Quick Start / Top 10 High-Frequency Interfaces” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files; may access external network resources; requires Vendor-specific API keys.
## Running Rules
- read files, write/modify files; may access external network resources; requires Vendor-specific API keys.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files.
Start with a small task and check whether the result follows “Overview / Quick Start / Top 10 High-Frequency Interfaces”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: akshare
description: AKShare financial data aggregator (18k+ stars). Free, no API key. Covers A-shares, US, HK, futur…
category: data
source: HKUDS/Vibe-Trading
---
# akshare
## When to use
- AKShare financial data aggregator (18k+ stars). Free, no API key. Covers A-shares, US, HK, futures, macro, forex. Prim…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “Overview / Quick Start / Top 10 High-Frequency Interfaces” and keep inference separate from source facts.
- read files, write/modify files; may access external network resources; requires Vendor-specific API keys.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "akshare" {
input -> user goal + target files + boundaries + acceptance criteria
context -> Overview / Quick Start / Top 10 High-Frequency Interfaces
rules -> SKILL.md triggers / order / output contract
runtime -> Python | read files, write/modify files | may access external network resources
guardrails -> requires Vendor-specific API keys + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} 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/
Decide Fit First
Design Intent
How To Use It
Boundaries And Review