← Back to Skills Marketplace
1438
Downloads
1
Stars
11
Active Installs
1
Versions
Install in OpenClaw
/install akshare-stock-1-0-1
Description
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
README (SKILL.md)
A股量化 - AkShare 数据接口
快速开始
安装依赖:
pip install akshare
支持的功能
1. 实时行情查询
import akshare as ak
# 个股实时行情
stock_zh_a_spot_em()
stock_zh_a_spot_em(symbol="北证A股")
2. 历史K线数据
import akshare as ak
# 日K线
stock_zh_a_hist(symbol="000001", period="daily", start_date="20240101", end_date="20241231", adjust="qfq")
# 周K线
stock_zh_a_hist(symbol="000001", period="weekly", start_date="20240101", end_date="20241231", adjust="qfq")
# 月K线
stock_zh_a_hist(symbol="000001", period="monthly", start_date="20240101", end_date="20241231", adjust="qfq")
3. 财务数据
import akshare as ak
# 财务报表
stock_financial_abstract_ths(symbol="000001", indicator="按报告期")
# 主要财务指标
stock_financial_analysis_indicator(symbol="000001")
4. 板块/行业分析
import akshare as ak
# 行业板块行情
stock_board_industry_name_em()
# 概念板块行情
stock_board_concept_name_em()
# 板块内个股
stock_board_industry_cons_em(symbol="半导体")
5. 资金流向
import akshare as ak
# 个股资金流向
stock_individual_fund_flow(stock="000001", market="sh")
# 大单净流入
stock_individual_fund_flow(stock="000001", market="sh", symbol="大单净流入")
6. 龙虎榜
import akshare as ak
# 每日龙虎榜
stock_lhb_detail_em(date="20240930")
# 机构调研
stock_zlzj_em()
7. 新股/IPO
import akshare as ak
# 新股申购
stock_new_ipo_em()
# 待上市新股
stock_new_ipo_start_em()
8. 融资融券
import akshare as ak
# 融资融券
stock_margin_sse(symbol="600000")
# 融资融券明细
stock_rzrq_detail_em(symbol="600000", date="20240930")
常用股票代码
- 平安银行: 000001
- 贵州茅台: 600519
- 宁德时代: 300750
- 比亚迪: 002594
- 招商银行: 600036
备选方案: Baostock
如果 AkShare 安装失败,可使用 baostock(更轻量):
import baostock as bs
# 登录
lg = bs.login()
print(lg.error_msg)
# 获取历史K线
rs = bs.query_history_k_data_plus('sh.600519',
'date,code,open,high,low,close,volume',
start_date='20250101',
end_date='20251231')
data_list = []
while rs.next:
data_list.append(rs.get_row_data())
bs.logout()
注意事项
- 数据仅供学术研究,不构成投资建议
- 接口可能因目标网站变动而失效
- 建议添加异常处理和重试机制
- 当前环境网络问题可能导致测试失败,请在本地环境测试
Usage Guidance
This skill is coherent with its description: it calls AkShare functions to fetch A‑share market and financial data and asks you to pip install akshare. Before installing or running it: (1) be aware it needs network access and will fetch data from web sources (AkShare scrapers/APIs); (2) install akshare from the official PyPI source and review that package's reputation and dependencies; (3) run the script in an isolated environment if you are cautious; (4) note a small bug in scripts/stock_cli.py where get_fund_flow calls stock_individual_fund_flow without the ak. prefix — it will error unless fixed; (5) no credentials are requested by the skill itself, but the optional baostock example uses a login API (you should not provide secrets unless you understand how they're stored). If you want tighter assurance, review akshare/baostock upstream code or run the skill in a sandboxed environment first.
Capability Analysis
Type: OpenClaw Skill
Name: akshare-stock-1-0-1
Version: 1.0.0
The skill bundle is a legitimate tool for A-share stock market data analysis using the well-known AkShare and Baostock libraries. The Python script (scripts/stock_cli.py) and documentation (SKILL.md) focus entirely on financial data retrieval and lack any indicators of data exfiltration, malicious execution, or prompt injection.
Capability Assessment
Purpose & Capability
Name/description match the included SKILL.md examples and the provided scripts: the code calls AkShare APIs for quotes, historical K‑lines, board/sector data, fund flows, etc. No unrelated services or credentials are requested.
Instruction Scope
SKILL.md and the script only show calls to akshare (and an optional baostock example). Instructions do not ask the agent to read arbitrary files, access unrelated environment variables, or transmit data to unknown endpoints. Note: SKILL.md recommends installing akshare via pip and testing locally.
Install Mechanism
This is an instruction-only skill (no install spec). SKILL.md asks users to run 'pip install akshare' (and optionally baostock). Installing packages from PyPI is expected for this functionality but carries the usual supply‑chain/network risks — the skill itself does not embed downloads from unknown hosts.
Credentials
The skill declares no environment variables, no credentials, and no config paths. That is proportional: AkShare is a public library that uses network access but does not require secrets from the agent.
Persistence & Privilege
always is false and the skill does not request persistent/system‑wide modification. Autonomous invocation is enabled (default), which is normal and appropriate here given the skill's purpose.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install akshare-stock-1-0-1 - After installation, invoke the skill by name or use
/akshare-stock-1-0-1 - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- 首个版本发布,基于 AkShare 提供 A股股票量化数据分析功能
- 支持实时行情、历史K线、财务数据、板块及行业查询、资金流向、龙虎榜、新股认购、融资融券等主流A股数据接口
- 提供常用股票代码示例及可选 Baostock 方案
- 包含快速安装指引和接口调用参考
- 适用于A股行情查询、财务分析及选股等应用场景
Metadata
Frequently Asked Questions
What is Akshare Stock 1.0.1?
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。 It is an AI Agent Skill for Claude Code / OpenClaw, with 1438 downloads so far.
How do I install Akshare Stock 1.0.1?
Run "/install akshare-stock-1-0-1" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Akshare Stock 1.0.1 free?
Yes, Akshare Stock 1.0.1 is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Akshare Stock 1.0.1 support?
Akshare Stock 1.0.1 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Akshare Stock 1.0.1?
It is built and maintained by kenswj (@kenswj); the current version is v1.0.0.
More Skills