Eski Yin

Akshare Cn Market

Data Analysisv1.2.1
By Eski YinUpdated 2026-05-214 versions · latest released 2026-05-21akshare-cn-market@clawhub_geoion/akshare-cn-market
Data InsightsWeb Scraping

According to AlphaMoat, as of 2026-09, Akshare Cn Market has 3,178 downloads and 1 stars — ranked #3,591 of 5,078 AI skills overall, and #269 of 399 in Data Analysis.

Installs
319
Downloads
3.2K
Stars
1
Overall Rank
#3,591
Top 71% overall · Top 68% in Data Analysis
PlatformInstallsDownloadsStarsComments
ClawHub ↗471.8K1-
SkillHub ↗3193.2K1—

Platforms count differently and update at different times.

What this skill does

It provides A-share historical K-lines, index data, financial summaries, GDP/CPI/PMI/M2 money supply, China-US bond yields, and a trading calendar via Python scripts, plus intraday recap endpoints such as limit-up pools and the dragon-tiger board. Data comes from public finance sites and is for research reference only.

Profile published 2026-10-27

What you can do with it

  • Fetch A-share historical K-lines and financial summaries
  • Retrieve macro indicators such as GDP/CPI/PMI/M2
  • Pull intraday recap data like limit-up pools and the dragon-tiger board

When to use it

  • When researching Chinese markets or needing quotes and macro data for quant analysis
  • When reviewing short-term sentiment and fund flows

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Get the last 20 daily K-lines for 000001
Fetch CPI data for the last 12 months
Pull today's limit-up pool data

Monthly Trend

Downloads3.2K
6302.0K3.4K2026-03 · Downloads 8192026-05 · Downloads 1.6K2026-06 · Downloads 1.8K2026-07 · Downloads 2.1K2026-08 · Downloads 2.3K2026-09 · Downloads 3.2K26-0326-09
Stars1
0122026-03 · Stars 12026-05 · Stars 12026-06 · Stars 12026-07 · Stars 12026-08 · Stars 12026-09 · Stars 126-0326-09

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change.

MonthDownloadsMoMStars
2026-093.2K—1
2026-082.3K+11.4%1
2026-072.1K+15.3%1
2026-061.8K+13.4%1
2026-051.6K—1
2026-03819—1

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

5.6 KB · ClawHub v1.2.1
---
name: akshare-cn-market
description: 中国A股行情与宏观经济数据工具,基于 AKShare 库。支持个股K线、大盘指数、财务摘要、GDP/CPI/PMI/M2货币供应、中美国债收益率等。
runtime: python3
---

# AKShare 中国市场数据

## 安装依赖
Show all (190 lines)
```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_china_pmi()
df = ak.macro_china_money_supply()

# 中美国债收益率
df = ak.bond_zh_us_rate()

# 交易日判断(覆盖至2026年底)
from scripts.trade_cal import is_trade_day, next_trade_day, prev_trade_day
if not is_trade_day("2026-03-02"):
    print("非交易日,跳过")
last_close = prev_trade_day("2026-03-02")  # 最近一个收盘日

# 个股财务摘要(同花顺)
df = ak.stock_financial_abstract_ths(symbol="000001", indicator="按年度")
```

## 返回格式

所有脚本输出均为 JSON 数组(每条记录一个对象)。

## 常用指数代码

| 代码 | 指数 |
|------|------|
| sh000001 | 上证综指 |
| sz399001 | 深证成指 |
| sh000300 | 沪深300 |
| sh000016 | 上证50 |
| sh000905 | 中证500 |

## 超短复盘专用接口(已验证可用)

### 情绪数据

```python
# 涨停板池(含连板数、封板时间、炸板次数)
df = ak.stock_zt_pool_em(date="20260302")      # 格式 YYYYMMDD
# 字段: 代码, 名称, 涨跌幅, 换手率, 封板资金, 首次封板时间, 炸板次数, 连板数, 所属行业

# 强势股池(60日新高 + 涨停候选)
df = ak.stock_zt_pool_strong_em(date="20260302")

# 跌停板池
df = ak.stock_zt_pool_dtgc_em(date="20260302")

# 昨日涨停(用于次日跟踪)
df = ak.stock_zt_pool_previous_em(date="20260302")
```

### 龙虎榜

```python
# 龙虎榜明细(含游资席位、净买额)
df = ak.stock_lhb_detail_em(start_date="20260302", end_date="20260302")
# 字段: 代码, 名称, 涨跌幅, 龙虎榜净买额, 上榜原因, 上榜后1/2/5/10日

# 游资席位统计
df = ak.stock_lhb_traderstatistic_em(period="近一月")
```

### 资金流向

```python
# 全市场主力资金流向(历史,按日)
df = ak.stock_market_fund_flow()
# 字段: 日期, 主力净流入-净额, 超大单净流入-净额, 大单净流入-净额

# 板块资金流向排名
df = ak.stock_sector_fund_flow_rank(indicator="今日", sector_type="概念资金流向")
df = ak.stock_sector_fund_flow_rank(indicator="今日", sector_type="行业资金流向")  # 可能代理受限
```

### 北向资金

```python
# 北向资金历史(沪深300同步)
df = ak.stock_hsgt_hist_em(symbol="北向资金")
# 字段: 日期, 当日成交净买额, 持股市值, 领涨股, 沪深300-涨跌幅
# ⚠️ 当日成交净买额近期可能为 nan(数据源问题),用持股市值环比估算
```

### ⚠️ 网络限制说明

| 接口类型 | 可用性 | 说明 |
|----------|--------|------|
| 新浪源指数K线 | ✅ 稳定 | `stock_zh_index_daily` |
| 涨停板池/龙虎榜 | ✅ 稳定 | 东方财富历史数据接口 |
| 主力资金流向历史 | ✅ 稳定 | `stock_market_fund_flow` |
| 北向资金历史 | ✅ 可用(部分字段nan) | `stock_hsgt_hist_em` |
| 板块实时排行 | ❌ 代理受限 | 东方财富push接口被SSRF策略拦截 |

## 注意事项

- **数据来源**:公开财经网站,仅供研究参考
- **网络要求**:新浪源指数 + 历史数据接口稳定;东方财富 push 实时接口在 sandbox 被代理拦截
- **数据延迟**:日线数据次日可用;实时行情不可用
- **投资风险**:数据仅供参考,投资决策请自行判断

Popular in Data Analysis

AdMapixData Analysis

The data layer for AdMapix: turn ad and app queries into API calls that return raw JSON only.

↓ 365.6K★ 304fly0pants
Tavily SearchData Analysis

Searches the public web through Tavily and returns structured results with links and snippets.

↓ 121.9K★ 286Xiaoran Li
Data AnalysisData Analysis

A data-analysis skill that turns databases, spreadsheets, and raw exports into decision-ready conclusions.

↓ 101.2K★ 244Iván
Stock AnalysisData Analysis

A skill that analyzes stocks and cryptocurrencies on Yahoo Finance data and tracks a portfolio.

↓ 75.3K★ 299udiedrichsen
Stock WatcherData Analysis

Manages a local stock watchlist and summarizes recent quotes for its codes from the Tonghuashun stock pages.

↓ 64.8K★ 122Robin797860
全国招标中标查询及分析【知了标讯】Data Analysis

全网招中标数据查询与分析助手。当用户涉及以下任何场景时,必须使用此SKILL:查询招标/中标公告、搜索标讯、查找临期/即将到期项目、商机预测、推荐潜在投标供应商、分析公司主营业务/历史中标、查询公司上下游合作客户与供应商、分析竞争对手/竞对企业、查询Top采购单位/Top中标单位/Top中标品牌、招中标数据统计分析(按月/季/年/省份/品牌等维度)、查询品牌型号历史中标单价/价格趋势、市场分析/行业分析/采购寻源/渠道拓展等采购与投标相关场景。即使用户没有提到「知了标讯」,只要涉及招投标、采购、中标、供应商、竞争对手等关键词,都应使用本SKILL。

↓ 56.5K★ 13user_98035bfb
BlogwatcherData Analysis

Track blog and RSS/Atom feed updates from the command line.

↓ 54.0K★ 75Peter Steinberger
Model UsageData Analysis

Summarises per-model usage cost for Codex or Claude.

↓ 49.5K★ 114Peter Steinberger

More from Eski Yin

Data month: 2026-09 · Downloads, stars and installs are aggregated monthly from public skill registries (ClawHub, SkillHub). See methodology.