A股数据分析 (AkShare)
A股量化数据分析工具,基于AkShare库获取A股、港股、美股行情、财务数据、板块分析等。用于回答关于股票查询、行情数据、财务分析、资金流向、龙虎榜、涨停跌停、新股IPO、融资融券等问题。 Skill: A股数据分析 (AkShare) Owner: awsl1414 Summary: A股量化数据分析工具,基于AkShare库获取A股、港股、美股行情、财务数据、板块分析等。用于回答关于股票查询、行情数据、财务分析、资金流向、龙虎榜、涨停跌停、新股IPO、融资融券等问题。 Tags: latest:1.0.1 Version history: v1.0.1 | 2026-03-28T09:08:13.443Z | user 初始发布:A股/港股/美股行情、财务、板块、龙虎榜、涨停跌停、新股IPO、融资融券等150+接口,含个股查询规则 v1.2.1 | 2026-03-28T09:05:36.583Z | user 新增个股查询规则:禁止用全市场接口筛选个股,推荐使用 stock_bid_ask_em、stock_individual_info_em、stock_zh_a_hist 等个股专用接口 v1.2.0 |
Rank
62
Safety
84
Downloads
2.8k
Updated
Oct 9, 2026
Version
1.0.1
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 2.8K downloads reported by the source. Last updated 10/9/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 9, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 9, 2026
- Adoption signal
- 2.8K downloadsadoption · observed Oct 9, 2026
- Latest release
- 1.0.1release · observed Mar 28, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s170h7fpkeh57kh4kxehr5pg5s83hszr:akshare-a-stock- Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-awsl1414-akshare-a-stock/snapshot"
Documentation
CLAWHUB
69,680 characters of source documentation, loaded on request.
Extracted files
4 files captured from the source.
SKILL.md
---
name: akshare-a-stock
description: A股量化数据分析工具,基于AkShare库获取A股、港股、美股行情、财务数据、板块分析等。用于回答关于股票查询、行情数据、财务分析、资金流向、龙虎榜、涨停跌停、新股IPO、融资融券等问题。
---
# A股量化 - AkShare 数据接口
> AkShare v1.18.48 | 数据来源:东方财富、同花顺、新浪、巨潮资讯等
## 快速开始
```bash
uv pip install akshare
```
```python
import akshare as ak
```
## 注意事项
1. 数据仅供学术研究,不构成投资建议
2. 部分接口返回数据量大,建议使用 `df.head()` 或切片
3. 实时行情接口较慢(⚠️ >15s),建议加超时处理
4. 日期格式统一为 `YYYYMMDD`(如 `"20250101"`),分钟线为 `"YYYY-MM-DD HH:MM:SS"`
5. 股票代码不带前缀(如 `"000001"` 而非 `"SZ000001"`)
6. **⚠️ 查个股必须用个股接口,禁止用全市场接口筛选!**
- ✅ `stock_bid_ask_em(symbol="600227")` — 个股盘口,~3s
- ✅ `stock_individual_info_em(symbol="600227")` — 个股基本信息,~3s
- ✅ `stock_zh_a_hist(symbol="600227", ...)` — 个股历史K线,~5s
- ❌ `stock_zh_a_spot_em()` — 全A行情 ~70s,仅用于需要全市场扫描的场景
---
## 1. 实时行情
### 全市场行情 ⚠️ 较慢
```python
ak.stock_zh_a_spot_em() # 沪深京全部A股 (~70s, 5800+ rows)
ak.stock_sh_a_spot_em() # 沪A股 (~28s, 2400+ rows)
ak.stock_sz_a_spot_em() # 深A股
ak.stock_bj_a_spot_em() # 北证A股
ak.stock_cy_a_spot_em() # 创业板
ak.stock_kc_a_spot_em() # 科创板
ak.stock_new_a_spot_em() # 新股
```
### 港股/美股
```python
ak.stock_hk_spot_em() # 港股实时 ⚠️ 较慢
ak.stock_us_spot_em() # 美股实时 ⚠️ 较慢
ak.stock_zh_ah_spot_em() # AH股对比
```
### 个股详情
```python
ak.stock_individual_info_em(symbol="000001") # 个股基本信息
ak.stock_individual_spot_xq(symbol="000001") # 雪球个股行情
ak.stock_bid_ask_em(symbol="000001") # 五档盘口
```
### 指数行情
```python
ak.stock_zh_index_spot_em() # A股指数实时
ak.stock_zh_index_daily_em(symbol="sh000001") # 指数日线
```
---
## 2. 历史K线
### 日/周/月K线
```python
ak.stock_zh_a_hist(
symbol="000001", # 股票代码
period="daily", # daily/weekly/monthly
start_date="20250101",
end_date="20250301",
adjust="qfq" # qfq前复权 / hfq后复权 / ""不复权
)
```
### 分钟K线
```python
ak.stock_zh_a_hist_min_em(
symbol="000001",
period="1", # 1/5/15/30/60
start_date="2025-03-27 09:30:00",
end_date="2025-03-27 15:00:00",
adjust=""
)
```
### 港股/美股K线
```python
ak.stock_hk_hist(symbol="00700", period="daily", start_date="20250101", end_date="20250301", adjust="qfq")
ak.stock_us_hist(symbol="AAPL", period="daily", start_date="20250101", end_date="20250301", adjust="qfq")
ak.stock_hk_hist_min_em(symbol="00700", period="1", start_date="2025-03-27 09:30:00", end_date="2025-03-27 16:00:00")
ak.stock_us_hist_min_em(symbol="AAPL", period="1", start_date="2025-03-27 09:30:00", end_date="2025-03-27 16:00:00")
```
---
## 3. 板块分析
### 板块列表
```python
ak.stock_board_industry_name_em() # 行业板块行情
ak.stock_board_concept_name_em() # 概念板块行情
```
### 板块成分股
```python
ak.stock_board_industry_cons_em(symbol="银行") # 行业板块个股
ak.stock_board_concept_cons_em(symbol="人工智能") # 概念板块个股
```
### 板块历史K线
```python
ak.stock_board_industry_hist_em(symbol="银行", period="daily", start_date="20250101", end_date="20250301")
ak.stock_board_concept_hist_em(symbol="人工智能", period="daily", start__meta.json
{
"ownerId": "kn7ezyhscc5y06j7yfmpva6d0582fwk5",
"slug": "akshare-a-stock",
"version": "1.0.1",
"publishedAt": 1774688893443
}references/api-reference.md
# AkShare 股票相关接口完整列表 > 基于 akshare v1.18.48,按功能分类整理。标注 ❌ 的接口测试失败或已废弃。 ## A股行情 | 接口 | 说明 | 备注 | |------|------|------| | `stock_zh_a_spot_em()` | 沪深京A股实时 | ⚠️ ~70s | | `stock_sh_a_spot_em()` | 沪A实时 | ⚠️ ~28s | | `stock_sz_a_spot_em()` | 深A实时 | | | `stock_bj_a_spot_em()` | 北证A股 | | | `stock_cy_a_spot_em()` | 创业板 | | | `stock_kc_a_spot_em()` | 科创板 | | | `stock_new_a_spot_em()` | 新股 | | | `stock_zh_a_st_em()` | ST股 | | | `stock_zh_a_hist()` | 日/周/月K线 | 核心接口 | | `stock_zh_a_hist_min_em()` | 分钟K线 | | | `stock_zh_a_minute()` | 分时数据(旧) | | | `stock_zh_a_daily()` | 日线(旧) | | | `stock_intraday_em()` | 分时行情 | | | `stock_bid_ask_em()` | 五档盘口 | | | `stock_individual_spot_xq()` | 雪球行情 | | ## 港股 | 接口 | 说明 | |------|------| | `stock_hk_spot_em()` | 港股实时 ⚠️ | | `stock_hk_daily()` | 港股日线 | | `stock_hk_hist()` | 港股历史K线 | | `stock_hk_hist_min_em()` | 港股分钟K线 | | `stock_hk_main_board_spot_em()` | 主板实时 | | `stock_hk_famous_spot_em()` | 知名港股 | | `stock_hk_index_spot_em()` | 港股指数 | | `stock_hk_hot_rank_em()` | 港股热股 | | `stock_hk_valuation_baidu()` | 百度估值 | | `stock_hk_valuation_comparison_em()` | 估值对比 | | `stock_hk_financial_indicator_em()` | 财务指标 | | `stock_hk_growth_comparison_em()` | 成长对比 | | `stock_hk_scale_comparison_em()` | 规模对比 | ## 美股 | 接口 | 说明 | |------|------| | `stock_us_spot_em()` | 美股实时 ⚠️ | | `stock_us_daily()` | 美股日线 | | `stock_us_hist()` | 美股历史K线 | | `stock_us_hist_min_em()` | 美股分钟K线 | | `stock_us_famous_spot_em()` | 知名美股 | | `stock_us_valuation_baidu()` | 百度估值 | | `stock_us_pink_spot_em()` | 粉单市场 | ## 板块 | 接口 | 说明 | |------|------| | `stock_board_industry_name_em()` | 行业板块列表 | | `stock_board_concept_name_em()` | 概念板块列表 | | `stock_board_industry_cons_em(symbol)` | 行业成分股 | | `stock_board_concept_cons_em(symbol)` | 概念成分股 | | `stock_board_industry_hist_em()` | 行业历史K线 | | `stock_board_concept_hist_em()` | 概念历史K线 | | `stock_board_industry_spot_em()` | 行业实时 | | `stock_board_concept_spot_em()` | 概念实时 | | `stock_board_industry_hist_min_em()` | 行业分钟K线 | | `stock_board_concept_hist_min_em()` | 概念分钟K线 | | `stock_board_change_em()` | 板块变动 | ## 资金流向 | 接口 | 说明 | |------|------| | `stock_individual_fund_flow()` | 个股资金流 | | `stock_individual_fund_flow_rank()` | 个股排名 | | `stock_market_fund_flow()` | 大盘资金流 | | `stock_main_fund_flow()` | 主力资金流 | | `stock_fund_flow_big_deal()` | 大单交易 | | `stock_fund_flow_industry()` | 行业资金流 | | `stock_fund_flow_concept()` | 概念资金流 | | `stock_sector_fund_flow_rank()` | 板块排名 | | `stock_sector_fund_flow_summary()` | 板块汇总 | | `stock_sector_fund_flow_hist()` | 板块历史 | | `stock_fund_flow_individual()` | 个股历史 | ## 龙虎榜 | 接口 | 说明 | |------|------| | `stock_lhb_detail_em(start_date, end_date)` | 龙虎榜详情 | | `stock_lhb_stock_detail_em(symbol)` | 个股龙虎榜 | | `stock_lhb_stock_statistic_em()` | 统计 | | `stock_lhb_jgstatistic_em()` | 机构统计 | | `stock_lhb_jgmx_sina()` | 机构明细(新浪) | | `stock_lhb_yybph_em()` | 营业部排行 | | `stock_lhb_yyb_detail_em()` | 营业部详情 | | `stock_lhb_hyyyb_em()` | 活跃营业部 | | `stock_lhb_jgmmtj_em()` | 机构买卖统计 | ## 涨停/跌停 | 接口 | 说明 | 备注 |
skill-card.md
## Description: A股量化数据分析工具,基于AkShare库获取A股、港股、美股行情、财务数据、板块分析等,用于回答关于股票查询、行情数据、财务分析、资金流向、龙虎榜、涨停跌停、新股IPO、融资融券等问题。 This skill is for research and development only. ## Publisher: [awsl1414](https://clawhub.ai/user/awsl1414) ### License/Terms of Use: MIT-0 ## Use Case: Developers, analysts, and research users can use this skill to query AkShare-based market data and generate guidance for A-share, Hong Kong stock, and U.S. stock行情, financial data, sector analysis, fund flows, IPOs, margin trading, and related stock research questions. The skill output should be treated as research data, not investment advice. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: AkShare dependency or market-data behavior can change over time. Mitigation: Pin AkShare to a reviewed version or use a lockfile before installation. Risk: The skill and bundled CLI make outbound requests to public market-data sources. Mitigation: Run in an environment where outbound data-source access is expected and permitted. Risk: Market data can be incomplete, delayed, or unsuitable for investment decisions. Mitigation: Treat outputs as research data and do not use them as investment advice. Risk: The bundled fund-flow CLI command may fail without correction. Mitigation: Review and fix the fund-flow CLI implementation before relying on that command. ## Reference(s): - [AkShare 股票相关接口完整列表](artifact/references/api-reference.md) - [ClawHub skill page](https://clawhub.ai/awsl1414/skills/akshare-a-stock) ## Skill Output: **Output Type(s):** [guidance, code, shell commands, configuration] **Output Format:** [Markdown with Python and shell code examples] **Output Parameters:** [1D] **Other Properties Related to Output:** [May produce AkShare API calls and JSON-style CLI output examples; market-data responses depend on external public data sources.] ## Skill Version(s): 1.0.1 (source: server release evidence) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/awsl1414/skills/akshare-a-stock",
"sourceUrl": "https://clawhub.ai/awsl1414/skills/akshare-a-stock",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T11:41:01.131Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-awsl1414-akshare-a-stock/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-awsl1414-akshare-a-stock/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-09T11:41:01.131Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "2.8K downloads",
"href": "https://clawhub.ai/awsl1414/akshare-a-stock",
"sourceUrl": "https://clawhub.ai/awsl1414/akshare-a-stock",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T11:41:01.131Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.0.1",
"href": "https://clawhub.ai/awsl1414/akshare-a-stock",
"sourceUrl": "https://clawhub.ai/awsl1414/akshare-a-stock",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-03-28T09:08:13.443Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-awsl1414-akshare-a-stock/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-awsl1414-akshare-a-stock/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.0.1",
"description": "初始发布:A股/港股/美股行情、财务、板块、龙虎榜、涨停跌停、新股IPO、融资融券等150+接口,含个股查询规则",
"href": "https://clawhub.ai/awsl1414/akshare-a-stock",
"sourceUrl": "https://clawhub.ai/awsl1414/akshare-a-stock",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-03-28T09:08:13.443Z",
"isPublic": true
}
]
}Record generated Oct 10, 2026.
