← 返回 Skills 市场
A股市场数据
作者
Nick deep234
· GitHub ↗
· v1.0.0
· MIT-0
346
总下载
0
收藏
5
当前安装
1
版本数
在 OpenClaw 中安装
/install ashare
功能描述
Use AKShare to answer Chinese market-data questions about A-shares, China indexes, open-end mutual funds, macro indicators, macro calendar events, and financ...
使用说明 (SKILL.md)
A股市场数据
Use this skill to query a fixed whitelist of AKShare market datasets through the bundled CLI.
Workflow
- Convert relative dates to absolute
YYYYMMDDbefore calling the script. - Map the user's request to one of the supported subcommands in
references/datasets.md. - Run only the bundled script with OpenClaw
exec:
python "{baseDir}/scripts/query_akshare.py" \x3Csubcommand> [args...]
- Read the JSON envelope from stdout.
- Reply in Chinese with a short summary plus the most relevant values from the returned
rows.
Hard Rules
- Use only
python "{baseDir}/scripts/query_akshare.py" .... - Do not paste the user's raw request into shell pipelines.
- Do not generate ad-hoc Python snippets to call AKShare directly.
- Do not guess when a symbol match is ambiguous; surface the returned candidates.
- Keep dates in
YYYYMMDD. - Treat missing
akshareas an environment issue and relay the install command from the error payload.
Supported Commands
market-overview- Return A-share market breadth, major indices, top 10 gainers, and top 10 losers.
stock-quote \x3Csymbol>- Real-time A-share quote by code or exact name.
stock-history \x3Csymbol> [--start-date YYYYMMDD] [--end-date YYYYMMDD] [--period daily|weekly|monthly] [--adjust none|qfq|hfq] [--limit N]stock-profile \x3Csymbol>- Company and security profile from Eastmoney.
index-quote \x3Csymbol>- Real-time China index quote by code or exact name.
index-history \x3Csymbol> [--start-date YYYYMMDD] [--end-date YYYYMMDD] [--period daily|weekly|monthly] [--limit N]fund-quote \x3Csymbol>- Open-end mutual fund daily NAV snapshot by code or exact name.
fund-history \x3Csymbol> [--indicator unit_nav|acc_nav|acc_return] [--period 1m|3m|6m|1y|3y|5y|ytd|all] [--limit N]macro-series \x3Calias>- Supported aliases:
china_cpi,china_pmi,china_rmb.
- Supported aliases:
macro-calendar [--date YYYYMMDD] [--limit N]news-flash [--scope all|important] [--limit N]
Command Examples
python "{baseDir}/scripts/query_akshare.py" market-overview
python "{baseDir}/scripts/query_akshare.py" stock-quote 000001
python "{baseDir}/scripts/query_akshare.py" stock-history 600519 --start-date 20260101 --end-date 20260313
python "{baseDir}/scripts/query_akshare.py" index-history 000300 --limit 60
python "{baseDir}/scripts/query_akshare.py" fund-history 000001 --indicator unit_nav --limit 60
python "{baseDir}/scripts/query_akshare.py" macro-series china_pmi
python "{baseDir}/scripts/query_akshare.py" macro-calendar --date 20260313
python "{baseDir}/scripts/query_akshare.py" news-flash --limit 10
Output Contract
Every success response is a JSON object with:
okdatasetakshare_functionresolvedparamscolumnsrowsrow_counttruncatedas_of
Every failure response is a JSON object with:
ok: falseerror.typeerror.message- optional
error.details
Error types are limited to:
missing_dependencyinvalid_argumentunsupported_queryambiguous_symbolruntime_error
Summary Style
- Lead with the direct answer in Chinese.
- Mention the symbol or dataset that was resolved.
- For quotes, include latest price and change fields when present.
- For history, describe the date range covered by the returned rows.
- For market overview, mention breadth and the main index moves.
- For macro/news results, surface the latest or most important rows instead of dumping the whole payload.
安全使用建议
This skill bundles a Python script that calls the AKShare library to fetch Chinese market, fund, macro, and news data. It does not ask for credentials and only requires python to run. Before installing, verify you are comfortable with the agent executing the included Python file (it will make network requests via AKShare to third‑party data sources). If AKShare is not installed in your environment, the script will report a missing_dependency error — you can install AKShare separately in a controlled environment. If you need stronger guarantees, review the full scripts/query_akshare.py source yourself or run it locally to confirm behavior and the AKShare version it requires.
功能分析
Type: OpenClaw Skill
Name: ashare
Version: 1.0.0
The 'ashare' skill bundle is a well-structured and secure wrapper for the AKShare financial data library. The core logic in `scripts/query_akshare.py` uses strict argument parsing via argparse and maps user requests to a hardcoded whitelist of AKShare functions, preventing arbitrary code execution. Furthermore, `SKILL.md` includes explicit security instructions for the AI agent, such as forbidding the use of raw shell pipelines or the generation of ad-hoc Python snippets, which effectively mitigates prompt-injection risks.
能力评估
Purpose & Capability
Name/description match the delivered artifacts: SKILL.md documents a CLI that queries AKShare and the bundle includes a Python script implementing that CLI. The only required binary is python, which is proportional.
Instruction Scope
Runtime instructions are narrow and prescriptive: they require invoking only the bundled script, forbid embedding user input directly into shells, and limit queries to a fixed whitelist of datasets. The SKILL.md and script both focus on fetching and returning market/macro/news data.
Install Mechanism
No install spec that downloads remote code; the script is bundled in the skill. There are no external installers or downloads declared in the manifest.
Credentials
The skill requests no environment variables or credentials. It will import and call the AKShare library at runtime (network access for data retrieval is expected for this purpose) but does not ask for secrets or unrelated service keys.
Persistence & Privilege
always is false and user-invocable is true. The skill does not request elevated or persistent system privileges and does not attempt to modify other skills or system configuration.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install ashare - 安装完成后,直接呼叫该 Skill 的名称或使用
/ashare触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of ashare skill.
- Provides structured answers to Chinese market-data questions about A-shares, indexes, funds, macro indicators, and news using AKShare datasets.
- Supports fixed set of commands for real-time quotes, historical data, profiles, macro series, calendars, and news flashes.
- Enforces strict command-line invocation of AKShare scripts; no raw request execution or ad-hoc Python code.
- Replies in Chinese, summarizing the most relevant data from returned results.
- Relays installation commands for missing dependencies and handles ambiguous symbols transparently.
元数据
常见问题
A股市场数据 是什么?
Use AKShare to answer Chinese market-data questions about A-shares, China indexes, open-end mutual funds, macro indicators, macro calendar events, and financ... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 346 次。
如何安装 A股市场数据?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install ashare」即可一键安装,无需额外配置。
A股市场数据 是免费的吗?
是的,A股市场数据 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
A股市场数据 支持哪些平台?
A股市场数据 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 A股市场数据?
由 Nick deep234(@nickdeep1234)开发并维护,当前版本 v1.0.0。
推荐 Skills