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" <subcommand> [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 <symbol>- Real-time A-share quote by code or exact name.
stock-history <symbol> [--start-date YYYYMMDD] [--end-date YYYYMMDD] [--period daily|weekly|monthly] [--adjust none|qfq|hfq] [--limit N]stock-profile <symbol>- Company and security profile from Eastmoney.
index-quote <symbol>- Real-time China index quote by code or exact name.
index-history <symbol> [--start-date YYYYMMDD] [--end-date YYYYMMDD] [--period daily|weekly|monthly] [--limit N]fund-quote <symbol>- Open-end mutual fund daily NAV snapshot by code or exact name.
fund-history <symbol> [--indicator unit_nav|acc_nav|acc_return] [--period 1m|3m|6m|1y|3y|5y|ytd|all] [--limit N]macro-series <alias>- 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.
微信扫一扫