akshare-finance

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

3,891 stars

Best use case

akshare-finance is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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

Teams using akshare-finance should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/akshare-finance/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/benangel65/akshare-finance/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/akshare-finance/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How akshare-finance Compares

Feature / Agentakshare-financeStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# 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

Related Skills

afrexai-personal-finance

3891
from openclaw/skills

Complete personal finance system — budgeting, debt payoff, investing, tax optimization, net worth tracking, and financial independence planning. Use when managing money, building wealth, paying off debt, planning retirement, or optimizing taxes. Zero dependencies.

Personal Finance

excel-finance

3891
from openclaw/skills

Excel 财务模型技能 - Excel 财务模型模板、自动化报表生成

akshare-a-stock

3891
from openclaw/skills

A股量化数据分析工具,基于AkShare库获取A股、港股、美股行情、财务数据、板块分析等。用于回答关于股票查询、行情数据、财务分析、资金流向、龙虎榜、涨停跌停、新股IPO、融资融券等问题。

shumen_finance

3891
from openclaw/skills

Mainland China A-share stock and sector analysis tool (中国A股个股与板块分析). Provides real-time stock snapshots, financial statement analysis (财务分析/财报解读), unusual price movement detection (异动分析/支撑压力位), sector and theme analysis (板块分析/概念解读), and market news lookup (市场新闻). Covers price, K-line, money flow, valuation, earnings forecast, and industry ranking for Shanghai and Shenzhen listed equities.

AKShare-Skill

3891
from openclaw/skills

教你如何使用 AKShare 来获取财经数据

maybe-finance

3891
from openclaw/skills

Personal finance management skill using Maybe Finance OS. Use when users need to track expenses, analyze budgets, monitor net worth, or manage personal finances through the Maybe Finance self-hosted platform. Supports transaction tracking, account management, budget analysis, and financial reporting.

finance

3891
from openclaw/skills

Track stocks, ETFs, indices, crypto (where available), and FX pairs with caching + provider fallbacks.

Konto — Personal Finance API

3891
from openclaw/skills

Query personal finance data from Konto (bank accounts, investments, assets, loans, transactions).

personal-finance

3891
from openclaw/skills

Manage personal finances, track spending by category, set budgets, and receive reminders for EMIs and one-time annual expenses. Use for logging expenses, checking budget status, or setting up financial reminders.

yahoo-finance

3891
from openclaw/skills

Get stock prices, quotes, fundamentals, earnings, options, dividends, and analyst ratings using Yahoo Finance. Uses yfinance library - no API key required.

airoom-ltd-global-finance-data-platform

3891
from openclaw/skills

No description provided.

airoom.ltd-Global-Finance-Data-Platform Product Manual

3891
from openclaw/skills

① Project Vision: