← Back to Skills Marketplace
nickdeep1234

A股市场数据

by Nick deep234 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
346
Downloads
0
Stars
5
Active Installs
1
Versions
Install in OpenClaw
/install ashare
Description
Use AKShare to answer Chinese market-data questions about A-shares, China indexes, open-end mutual funds, macro indicators, macro calendar events, and financ...
README (SKILL.md)

A股市场数据

Use this skill to query a fixed whitelist of AKShare market datasets through the bundled CLI.

Workflow

  1. Convert relative dates to absolute YYYYMMDD before calling the script.
  2. Map the user's request to one of the supported subcommands in references/datasets.md.
  3. Run only the bundled script with OpenClaw exec:
python "{baseDir}/scripts/query_akshare.py" \x3Csubcommand> [args...]
  1. Read the JSON envelope from stdout.
  2. 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 akshare as 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.
  • 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:

  • ok
  • dataset
  • akshare_function
  • resolved
  • params
  • columns
  • rows
  • row_count
  • truncated
  • as_of

Every failure response is a JSON object with:

  • ok: false
  • error.type
  • error.message
  • optional error.details

Error types are limited to:

  • missing_dependency
  • invalid_argument
  • unsupported_query
  • ambiguous_symbol
  • runtime_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.
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install ashare
  3. After installation, invoke the skill by name or use /ashare
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug ashare
Version 1.0.0
License MIT-0
All-time Installs 5
Active Installs 5
Total Versions 1
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 346 downloads so far.

How do I install A股市场数据?

Run "/install ashare" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is A股市场数据 free?

Yes, A股市场数据 is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does A股市场数据 support?

A股市场数据 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created A股市场数据?

It is built and maintained by Nick deep234 (@nickdeep1234); the current version is v1.0.0.

💬 Comments