Agent skill

Akshare Finance

by aifinlab in aifinlab/FinClaw

AKShare财经数据接口库封装,提供股票、期货、期权、基金、外汇、债券、指数、加密货币等金融产品的基本面数据、实时和历史行情数据、衍生数据。

Apache-2.0Auto-check passed

Install Akshare Finance

skills CLI
$ npx skills add aifinlab/FinClaw --skill akshare-finance -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aifinlab/FinClaw akshare-finance --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aifinlab/FinClaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/akshare-finance .claude/skills/akshare-finance && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
akshare-finance
GitHub stars
255
Token cost
~657 tokens
SKILL.md length
44 words
Files
6 (incl. scripts, references)
Skills in repo
74
Repo updated
First seen
Licence
Apache-2.0

At a glance

AKShare财经数据接口库封装,提供股票、期货、期权、基金、外汇、债券、指数、加密货币等金融产品的基本面数据、实时和历史行情数据、衍生数据。

  • Works in 5 steps: 股票行情 → 宏观经济 → 加密货币 → …
  • SKILL.md covers 快速开始, 核心功能, 常用组合 and 注意事项, plus 3 more sections
  • Runs Python scripts from its folder; calls python and pip

What it does

Akshare Finance is an agent skill from aifinlab/FinClaw. AKShare财经数据接口库封装,提供股票、期货、期权、基金、外汇、债券、指数、加密货币等金融产品的基本面数据、实时和历史行情数据、衍生数据。

Its SKILL.md is about 660 tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts and reference files (for example `_meta.json`, `references/README.md` and `scripts/crypto_price.py`).

The licence is Apache-2.0.

Example prompts

  • “/akshare-finance”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. 股票行情
  2. 宏观经济
  3. 加密货币
  4. 外汇贵金属
  5. 财务数据

What it can do on your machine

Read from SKILL.md and the folder at commit 9e62862. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 3 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • akshare.akfamily.xyz
    • github.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Akshare Finance loads about 657 tokens when it runs, and up to ~991 if it reads all its reference files. Until then it costs about 22 tokens; SKILL.md has 44 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~22
When it runs · the whole SKILL.md, loaded when a task matches
~657
With references · SKILL.md plus every file in references/, read only if the agent opens them
~991

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from aifinlab/FinClaw at commit 9e62862, republished under its Apache-2.0 licence (© aifinlab). 44 words, ~657 tokens.

Download SKILL.mdSave it as .claude/skills/akshare-finance/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
akshare-finance
description
AKShare财经数据接口库封装,提供股票、期货、期权、基金、外汇、债券、指数、加密货币等金融产品的基本面数据、实时和历史行情数据、衍生数据。
keywords
股票, 财经, 行情, 加密货币, 宏观经济, AKShare

AKShare财经数据技能

快速开始

bash
# 安装依赖
pip install akshare pandas

# 测试安装
python -c "import akshare; print(akshare.__version__)"

核心功能

1. 股票行情
python
import akshare as ak

# A股实时行情
stock_zh_a_spot_em()  # 东方财富A股

# 股票K线数据
stock_zh_kline(symbol="000001", period="daily", adjust="qfq")

# 港股行情
stock_hk_spot_em()  # 港股实时

# 美股
stock_us_spot()  # 美股实时
2. 宏观经济
python
# GDP数据
macro_china_gdp()  # 中国GDP

# CPI通胀
macro_china_cpi()  # 中国CPI

# PMI采购经理指数
macro_china_pmi()  # 中国PMI

# 货币供应量
macro_china_m2()  # M2广义货币
3. 加密货币
python
# 币种列表
crypto_binance_symbols()  # 币安交易对

# 实时价格
crypto_binance_btc_usdt_spot()  # BTC/USDT

# K线数据
crypto_binance_btc_usdt_kline(period="daily")
4. 外汇贵金属
python
# 外汇汇率
forex_usd_cny()  # 美元兑人民币

# 贵金属
metals_shibor()  # 上海银行间拆借利率

# 金银价格
metals_gold()  # 国际金价
5. 财务数据
python
# 股票基本面
stock_fundamental(symbol="000001")  # 基本面数据

# 估值指标
stock_valuation(symbol="000001")  # PE、PB等

# 盈利能力
stock_profit_em(symbol="000001")

常用组合

投资组合监控
python
import akshare as ak
import pandas as pd

# 监控自选股
tickers = ["000001", "000002", "600519"]
for ticker in tickers:
    df = ak.stock_zh_kline(symbol=ticker, period="daily", adjust="qfq", start_date="20240101")
    latest = df.iloc[-1]
    print(f"{ticker}: 收盘价={latest['close']}, 涨跌幅={latest['pct_chg']}%")
市场概览
python
# A股大盘
index_zh_a_spot()  # 大盘指数

# 涨跌幅排行
stock_zh_a_spot_em()[['代码', '名称', '涨跌幅']].sort_values('涨跌幅', ascending=False)

注意事项

  1. 数据来源: 公开财经网站,仅用于学术研究
  2. 商业风险: 投资有风险,决策需谨慎
  3. 更新频率: 实时数据可能有延迟
  4. 数据验证: 建议多数据源交叉验证

输出格式

默认返回Pandas DataFrame,可直接处理:

python
df = ak.stock_zh_a_spot_em()
print(df.head())  # 查看前5行
print(df.columns)  # 查看列名
df.to_csv("data.csv")  # 保存CSV

参考文档

使用示例

示例 1: 基本使用
python
# 调用 skill
result = run_skill({
    "param1": "value1",
    "param2": "value2"
})
示例 2: 命令行使用
bash
python scripts/run_skill.py --input data.json

© aifinlab, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts, references) in skills/akshare-finance of aifinlab/FinClaw.

  • SKILL.md
  • _meta.json
  • references/README.md
  • scripts/crypto_price.py
  • scripts/macro_data.py
  • scripts/stock_price.py

Open the folder on GitHubat commit 9e62862

Compare with similar skills

Akshare Finance next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Akshare Finance compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Akshare Finance this skillaifinlab/FinClaw255—~657Automated safety check: PassApache-2.0
AKShare Financial DataHKUDS/Vibe-Trading35k—~777Automated safety check: PassMIT
Aksharelzwme/finance-quant-skills441—~1.1kAutomated safety check: PassNone
Akshare Online AlphaLeoYeAI/openclaw-master-skills2.2k—~1.6kAutomated safety check: PassMIT
Akshare Finance Datawentorai/research-plugins2981 repos~1.6kAutomated safety check: PassMIT
Mootdx A-Share DataHKUDS/Vibe-Trading35k—~1.2kAutomated safety check: PassMIT

Similar skills

  • AKShare Financial Data

    HKUDS/Vibe-Trading

    Pulls free market data from the AKShare Python library: A-share, US and Hong Kong prices, futures, China macro series and forex, with notes on symbol formats and Chinese column names.

    35k GitHub stars~777 tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Akshare

    lzwme/finance-quant-skills

    AKShare 开源金融数据接口库,提供股票、期货、期权、基金、外汇、债券、指数、加密货币等全品类金融数据;当用户需要获取各类金融市场数据时使用

    441 GitHub stars~1.1k tokensUpdated 18 days ago
    Business, Finance & HRAuto-check passed
  • Akshare Online Alpha

    LeoYeAI/openclaw-master-skills

    Run Wyckoff master-style analysis from stock codes, holdings (symbol/cost/qty), cash, CSV data, and optional chart images.

    2.2k GitHub stars~1.6k tokensUpdated 2 mo ago
    Business, Finance & HRAuto-check passed
  • Akshare Finance Data

    wentorai/research-plugins

    Access Chinese and global financial data using the AkShare Python library

    298 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed
  • Mootdx A-Share Data

    HKUDS/Vibe-Trading

    Pulls A-share price data from 通达信 (TDX) servers through the mootdx library over TCP, free and without an API key, as a stable fallback when akshare scraping is throttled.

    35k GitHub stars~1.2k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Backtrader

    lzwme/finance-quant-skills

    Backtrader 开源量化回测框架,支持多数据源、多策略、多周期回测与实盘交易,纯Python实现。当用户需要开发量化策略、进行回测分析、编写交易逻辑、回测参数优化,或提及 backtrader、量化回测框架时使用。若用户仅需数据获取而无回测需求,引导使用 baostock/akshare/tushare 等数据 Skill。

    441 GitHub stars~2.8k tokensUpdated 18 days ago
    Business, Finance & HRAuto-check passed

More from aifinlab/FinClaw

All 74 skills in this repo
  • Bank Corporate Credit Dd

    aifinlab/FinClaw

    A skill your agent uses when the user asks for help with corporate credit due diligence, enterprise credit investigation, pre-loan review, borrower analysis, document collection, management…

    255 GitHub stars~952 tokensUpdated 5 mo ago
    Auto-check passed
  • A skill your agent uses when you need a bank corporate-risk monitoring assistant for enterprise litigation/penalty/enforcement scanning (处罚/诉讼/被执行/失信等).

    255 GitHub stars~751 tokensUpdated 5 mo ago
    Auto-check passed
  • A skill your agent uses when you need a bank corporate client operating-volatility monitoring assistant (经营监测/指标波动/预警解释).

    255 GitHub stars~605 tokensUpdated 5 mo ago
    Auto-check passed
  • A skill your agent uses when you need a bank post-loan visit follow-up assistant to turn visit notes/materials into a structured memo (摘要/关键更新/风险观察/用途核验/行动项).

    255 GitHub stars~544 tokensUpdated 5 mo ago
    Auto-check passed
  • A skill your agent uses when you need a bank corporate credit issue-list assistant (问题清单/补件清单/催办台账).

    255 GitHub stars~487 tokensUpdated 5 mo ago
    Auto-check passed
  • A skill your agent uses when you need a bank corporate credit approval-opinion drafting assistant (审批意见/条款建议/有条件同意).

    255 GitHub stars~549 tokensUpdated 5 mo ago
    Auto-check passed

Questions about Akshare Finance

What does Akshare Finance do?

AKShare财经数据接口库封装,提供股票、期货、期权、基金、外汇、债券、指数、加密货币等金融产品的基本面数据、实时和历史行情数据、衍生数据。. Akshare Finance is an agent skill from aifinlab/FinClaw.

How do I install Akshare Finance in Claude Code?

Run `npx skills add aifinlab/FinClaw --skill akshare-finance -a claude-code`. Or copy the skill folder (skills/akshare-finance in aifinlab/FinClaw) into .claude/skills/akshare-finance in your project. Claude Code loads it when a task matches its description.

How do I install Akshare Finance in Codex?

Run `npx skills add aifinlab/FinClaw --skill akshare-finance -a codex`. Or copy the skill folder (skills/akshare-finance in aifinlab/FinClaw) into .agents/skills/akshare-finance in your project. Codex loads it when a task matches its description.

Can I use Akshare Finance in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aifinlab/FinClaw --skill akshare-finance -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/akshare-finance, .gemini/skills/akshare-finance, .github/skills/akshare-finance and .opencode/skills/akshare-finance in your project.

What does Akshare Finance need to run?

Going by SKILL.md and its folder, Akshare Finance needs Python for the scripts in its folder and the command-line tools its instructions call (python and pip). Our summary lists: Python 3.

Does Akshare Finance access the network?

SKILL.md names 2 domains. As links in the text: akshare.akfamily.xyz and github.com. This is read from the text; nothing was executed.

Is Akshare Finance safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Akshare Finance use?

Akshare Finance is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Akshare Finance use?

About 657 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 334 tokens, read only when the agent opens those files.

What are the alternatives to Akshare Finance?

Skills that share tags, products or a category with Akshare Finance: AKShare Financial Data (HKUDS/Vibe-Trading, 35k stars), Akshare (lzwme/finance-quant-skills, 441 stars), Akshare Online Alpha (LeoYeAI/openclaw-master-skills, 2.2k stars) and Akshare Finance Data (wentorai/research-plugins, 298 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Akshare Finance?

aifinlab (a GitHub user) maintains it in aifinlab/FinClaw, which has 255 GitHub stars. The repository holds 74 skills in this directory. The repository was last updated on May 13, 2026.

Source: aifinlab/FinClaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.