← 返回 Skills 市场
hexx89

Akshare Stock.Tmp

作者 hexx89 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
248
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install akshare-stock-tmp
功能描述
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
使用说明 (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()

注意事项

  1. 数据仅供学术研究,不构成投资建议
  2. 接口可能因目标网站变动而失效
  3. 建议添加异常处理和重试机制
  4. 当前环境网络问题可能导致测试失败,请在本地环境测试
安全使用建议
This skill appears to do what it says: use AkShare to fetch A‑share market and financial data. Before installing/using it: 1) Review and run the included script in a disposable environment (virtualenv/container) — there is a runtime bug in scripts/stock_cli.py (get_fund_flow calls stock_individual_fund_flow without the ak. prefix), and other minor robustness issues; 2) Confirm the package source when running pip install akshare (use PyPI, check version/signature) because pip installs run code at install time; 3) Note that AkShare performs network calls to third‑party data providers — queries may be sent to external servers and could be logged by those providers; 4) Investigate the metadata mismatch (_meta.json vs registry metadata) to ensure you're installing the intended package/version and author. If you need higher assurance, ask the publisher for a signed release or run the tool in an isolated sandbox.
功能分析
Type: OpenClaw Skill Name: akshare-stock-tmp Version: 1.0.0 The skill bundle is a legitimate tool for accessing A-share stock market data using the AkShare library. The Python script (scripts/stock_cli.py) and documentation (SKILL.md) focus entirely on financial data retrieval, such as real-time quotes and historical K-lines, with no evidence of data exfiltration, malicious execution, or prompt injection.
能力评估
Purpose & Capability
Name/description match the code and instructions: the skill uses the AkShare library to retrieve A‑share quotes, K‑lines, financials, board data, etc. There are no unrelated environment variables or binaries requested. Notable inconsistencies: _meta.json content (ownerId, slug, version) does not match the registry metadata in the submission, which suggests packaging/metadata drift that should be checked.
Instruction Scope
SKILL.md stays on topic: it tells the user/agent to pip install akshare and shows example calls to AkShare functions. It does not instruct accessing unrelated files, credentials, or external endpoints beyond AkShare's normal network calls. It warns about network issues and suggests local testing.
Install Mechanism
No automated install spec is included (instruction-only), but the README recommends pip install akshare. Using pip is expected for Python libs, but pip installs can execute arbitrary package install hooks—install in a virtual environment and verify package provenance if you are cautious.
Credentials
The skill requests no environment variables, credentials, or config paths. This is proportionate to the stated purpose. Be aware AkShare makes outbound network requests to public data sources (normal for this functionality).
Persistence & Privilege
Skill is user-invocable, not always-enabled, and does not request persistent elevated privileges or attempt to modify other skills or global agent config.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install akshare-stock-tmp
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /akshare-stock-tmp 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of A股量化数据分析工具 based on AkShare: - Provides real-time A股行情、历史K线、财务数据、板块/行业分析等多种数据接口 - Includes demo code for core features: 行情查询、财务分析、资金流向、龙虎榜、新股申购、融资融券 - Offers 常用股票代码速查表 - Suggests baostock as an alternative if AkShare cannot be used - Lists usage notes and troubleshooting tips
元数据
Slug akshare-stock-tmp
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Akshare Stock.Tmp 是什么?

A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 248 次。

如何安装 Akshare Stock.Tmp?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install akshare-stock-tmp」即可一键安装,无需额外配置。

Akshare Stock.Tmp 是免费的吗?

是的,Akshare Stock.Tmp 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Akshare Stock.Tmp 支持哪些平台?

Akshare Stock.Tmp 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Akshare Stock.Tmp?

由 hexx89(@hexx89)开发并维护,当前版本 v1.0.0。

💬 留言讨论