Home/Skills/Finance & Data/Akshare Finance
BenAngel65

Akshare Finance

BenAngel65·Feb 27, 2026

Summary

TL;DR: Connects your AI agent to Chinese financial market data through the AkShare library, covering A-shares, funds, bonds, futures, options, and macro indicators.

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

Created by BenAngel65, this skill has been downloaded 4k+ times on ClawHub. Install it with one command and your AI agent gains these capabilities right away.

Use cases

  • Pull historical price data for A-shares listed on the Shanghai or Shenzhen exchanges
  • Track Chinese government bond yields and compare them to US treasuries
  • Monitor commodity futures prices on Chinese exchanges like the Dalian Commodity Exchange
  • Fetch macroeconomic indicators like CPI, PMI, and GDP data published by Chinese government agencies

Installation

Run this command to install the skill on your OpenClaw agent:

Install with OpenClaw
npx clawhub@latest install akshare-finance
Downloads
4.1k
Active installs
44
Stars
13
Updated
Feb 27, 2026

Security scan

Security scan
VirusTotalBenign
View report
OpenClawBenignhigh confidence

The skill is a straightforward wrapper around the AKShare Python library to fetch financial and macro data; its requirements and instructions align with that purpose and request no unrelated credentials or suspicious installs.

Purpose & Capability
Instruction Scope
Install Mechanism
Credentials
Persistence & Privilege

SKILL.md

SKILL.md
---
name: akshare-finance
description: AKShare财经数据接口库封装,提供股票、期货、期权、基金、外汇、债券、指数、加密货币等金融产品的基本面数据、实时和历史行情数据、衍生数据。
metadata:
  {
    "openclaw":
      {
        "emoji": "📈",
        "requires": { "pip": ["akshare>=1.12", "pandas>=1.5"] },
        "install":
          [
            {
              "id": "pip-install",
              "kind": "pip",
              "packages": ["akshare>=1.12", "pandas>=1.5"],
              "label": "安装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
```

## 参考文档

- AKShare文档: https://akshare.akfamily.xyz/
- GitHub: https://github.com/akfamily/akshare

Version history

v1.0.0Latest
Feb 27, 2026

akshare-finance 1.0.0 - 首次发布,基于AKShare接口库封装财经数据查询功能 - 支持获取股票、期货、期权、基金、外汇、债券、指数、加密货币等金融产品的基本面及行情数据 - 提供宏观经济指标、财务数据、市场概览与投资组合监控示例 - 默认返回Pandas DataFrame,便于数据处理与分析 - 简要说明安装方法和常见用法

Frequently asked questions

It uses AkShare, which aggregates from multiple Chinese sources including Sina Finance, East Money, the CSRC, SSE, SZSE, and various government statistical agencies.

Installation method

Send this prompt to your agent to install the skill

npx clawhub@latest install akshare-finance
Download ZIP

Skill info

Versionv1.0.0
AuthorBenAngel65
UpdatedFeb 27, 2026

Files

SKILL.md3.1 KB

Run OpenClaw in the cloud

Deploy in seconds. Skills pre-installed.

See plans

Skill data sourced from ClawHub