Search

PythonReactSEOPDF
OpenClaw

akshare-cn-market

中国A股行情与宏观经济数据工具,基于 AKShare 库。支持个股K线、大盘指数、财务摘要、GDP/CPI/PMI/M2货币供应、中美国债收益率等。

geoion0 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install geoion/akshare-cn-market

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

AKShare 中国市场数据

安装依赖

pip install akshare pandas
# 验证
python3 -c "import akshare; print(akshare.__version__)"

脚本用法

股票行情(scripts/stock.py)
# 个股历史K线(默认最近10条日线,前复权)
python3 scripts/stock.py hist 000001
python3 scripts/stock.py hist 600519 --n 20 --start 20240101

# 大盘指数K线(新浪源)
python3 scripts/stock.py index sh000001      # 上证综指
python3 scripts/stock.py index sh000300      # 沪深300
python3 scripts/stock.py index sz399001      # 深证成指
python3 scripts/stock.py index sh000016 --n 5   # 上证50,最近5条

# 个股财务摘要(近5年)
python3 scripts/stock.py financial 000001
python3 scripts/stock.py financial 600519
宏观数据(scripts/macro.py)
# GDP 季度数据(默认最近8季度)
python3 scripts/macro.py gdp
python3 scripts/macro.py gdp --n 4

# CPI 月度数据(默认最近12个月)
python3 scripts/macro.py cpi

# PMI(制造业 + 非制造业,默认最近12个月)
python3 scripts/macro.py pmi

# 货币供应量 M0/M1/M2(默认最近12个月)
python3 scripts/macro.py money

# 中美国债收益率(默认最近10个交易日)
python3 scripts/macro.py bond --n 5
交易日历(scripts/trade_cal.py)
# 判断今天是否为交易日
python3 scripts/trade_cal.py check today

# 判断指定日期
python3 scripts/trade_cal.py check 2026-03-01

# 当天或之后最近的交易日
python3 scripts/trade_cal.py next today
python3 scripts/trade_cal.py next 2026-02-01

# 当天或之前最近的交易日(获取最近一个收盘日)
python3 scripts/trade_cal.py prev today

# 列出区间内所有交易日
python3 scripts/trade_cal.py range 2026-03-02 2026-03-06

数据来源:新浪财经,覆盖 1990-12-19 至 2026-12-31。

在 Agent 中直接调用

import akshare as ak

# A股个股K线
df = ak.stock_zh_a_hist(symbol="000001", period="daily", start_date="20240101", adjust="qfq")

# 大盘指数(新浪源,不受东方财富代理限制)
df = ak.stock_zh_index_daily(symbol="sh000001")

# 宏观:GDP / CPI / PMI / 货币供应
df = ak.macro_china_gdp()
df = ak.macro_china_cpi()
df = ak.macro...

Source information

Source
github
Repository
openclaw/skills
Path
skills/geoion/akshare-cn-market
Version
—
Commit
47ae989876ecfb4e3ffc1d9bf36ed0f1995bb25f
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

Extracted content

SKILL.md
# AKShare 中国市场数据

## 安装依赖

```bash
pip install akshare pandas
# 验证
python3 -c "import akshare; print(akshare.__version__)"
```

## 脚本用法

### 股票行情(scripts/stock.py)

```bash
# 个股历史K线(默认最近10条日线,前复权)
python3 scripts/stock.py hist 000001
python3 scripts/stock.py hist 600519 --n 20 --start 20240101

# 大盘指数K线(新浪源)
python3 scripts/stock.py index sh000001      # 上证综指
python3 scripts/stock.py index sh000300      # 沪深300
python3 scripts/stock.py index sz399001      # 深证成指
python3 scripts/stock.py index sh000016 --n 5   # 上证50,最近5条

# 个股财务摘要(近5年)
python3 scripts/stock.py financial 000001
python3 scripts/stock.py financial 600519
```

### 宏观数据(scripts/macro.py)

```bash
# GDP 季度数据(默认最近8季度)
python3 scripts/macro.py gdp
python3 scripts/macro.py gdp --n 4

# CPI 月度数据(默认最近12个月)
python3 scripts/macro.py cpi

# PMI(制造业 + 非制造业,默认最近12个月)
python3 scripts/macro.py pmi

# 货币供应量 M0/M1/M2(默认最近12个月)
python3 scripts/macro.py money

# 中美国债收益率(默认最近10个交易日)
python3 scripts/macro.py bond --n 5
```

### 交易日历(scripts/trade_cal.py)

```bash
# 判断今天是否为交易日
python3 scripts/trade_cal.py check today

# 判断指定日期
python3 scripts/trade_cal.py check 2026-03-01

# 当天或之后最近的交易日
python3 scripts/trade_cal.py next today
python3 scripts/trade_cal.py next 2026-02-01

# 当天或之前最近的交易日(获取最近一个收盘日)
python3 scripts/trade_cal.py prev today

# 列出区间内所有交易日
python3 scripts/trade_cal.py range 2026-03-02 2026-03-06
```

数据来源:新浪财经,覆盖 1990-12-19 至 2026-12-31。

## 在 Agent 中直接调用

```python
import akshare as ak

# A股个股K线
df = ak.stock_zh_a_hist(symbol="000001", period="daily", start_date="20240101", adjust="qfq")

# 大盘指数(新浪源,不受东方财富代理限制)
df = ak.stock_zh_index_daily(symbol="sh000001")

# 宏观:GDP / CPI / PMI / 货币供应
df = ak.macro_china_gdp()
df = ak.macro_china_cpi()
df = ak.macro...

Related skills

OpenClaw

13-Day Sprint Method

galizki

Productivity system based on Maya calendar with 13 natural tones for project management and personal development

OpenClaw

1password

daggerkun007

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.