A-Share Full-Stack Data Toolkit

10-layer architecture, 47 data endpoints, 15 data sources, zero-auth — one skill file integrates A-share market, research, capital flow and more.

Stars
★ 11k
Last updated
7d ago
License
Apache-2.0
Primary language
Python

At a glance

How it runs
Agent plugin / skillLibrary / SDK
Works with
Portable with changesClaude CodeCodex (Partial support)OpenAI API (Needs adaptation)
Cost
Free, no paid service needed
Setup effort
Low · running in minutes
You'll need
Python 3.9+mootdxrequestspandasstockstatsShell / CLINetwork accessLocal filesystem
Typical use
Individual investors using Claude Code to quickly query stock valuations (e.g., 'Estimate 688017, give PE/PEG/absorb time').
Not a fit if
  • Teams needing fully offline or air-gapped operation; all data comes from external public APIs
  • Users wanting a backtesting engine or strategy framework; this only fetches data
  • Overseas deployments without a China IP; mootdx times out

What does this agent do, and when should you use it?

a-stock-data is a self-contained Skill file designed for AI coding assistants (like Claude Code, Codex) that aggregates A-share (Chinese stock market) data from 15 public data sources into a directly usable toolkit. It features a 10-layer architecture covering market quotes, research reports, signals, capital flow, news, fundamentals, announcements, limit-up tracking, ETF options, and investor interaction, totaling 47 endpoints. The repository distributes a single SKILL.md file; users copy it to the skill directory and it works. Embedded Python code executes directly, compatible with Claude Code, Codex, OpenClaw, and other context-injection AI tools. It emphasizes zero-auth (except iwencai) and mitigates IP bans through data source prioritization and fallback strategies. Licensed under Apache-2.0, it suits developers needing rapid A-share data for investment research.

The agent reads SKILL.md and exposes data-fetching functions to the AI assistant. Users make natural language requests like 'check 688017 valuation', and the agent parses and calls appropriate functions. Operations include: calling mootdx for K-lines, five-level order books, and tick-by-tick data; Tencent Finance for PE/PB/market cap; Eastmoney endpoints for research reports, dragon-tiger lists, capital flows, margin trading, etc., with all Eastmoney calls rate-limited via em_get() to prevent IP bans; asking iwencai for natural-language research search (requires API key); fetching stock news via Eastmoney and Cailianshe telegraph; retrieving announcements from cninfo; quoting ETF options with Greeks, etc. It includes four built-in research workflows (single-stock valuation, batch comparison, themed research, new ticker research) and provides fallback sources (e.g., official exchange APIs) for degradation.

  1. Individual investors using Claude Code to quickly query stock valuations (e.g., 'Estimate 688017, give PE/PEG/absorb time').
  2. Quantitative researchers fetching dragon-tiger list data via natural language to analyze institutional moves (e.g., 'Did 002475 appear on the dragon-tiger list recently? Which brokers are buying?').
  3. Financial news editors using Cailianshe telegraph for real-time market alerts and monitoring major news.
  4. Investment analysts using iwencai for themed research (e.g., 'Recent reports on humanoid robotics supply chain, especially screws and reducers').
  5. Traders monitoring limit-up ladders and themes for short-term decisions (e.g., 'How many limit-ups today? What's the highest streak? What's the break rate?').
  6. Options traders querying IV and Delta of ETF options (e.g., 'What are the ATM option IV and Delta for 50ETF?').

How do you install or deploy this agent?

Installation: 1) Create skill directory mkdir -p ~/.claude/skills/a-stock-data; 2) Download SKILL.md: curl -o ~/.claude/skills/a-stock-data/SKILL.md https://raw.githubusercontent.com/simonlin1212/a-stock-data/main/SKILL.md; 3) Install Python dependencies: pip install mootdx requests pandas stockstats. For Codex/OpenClaw users, paste the SKILL.md content into your system prompt or project context file. iwencai requires an API key (https://www.iwencai.com/skillhub).

How do you use this agent?

After installation, in Claude Code simply say 'Help me check 688017's valuation' and it activates automatically. Other examples: say 'Which stocks are strong today and what themes?' for hot stocks; 'Is 000858's main capital flowing in or out today?' for capital flow; 'Pull up recent news and announcements for 300476'. All calls are natural language, no command memorization. For Codex/OpenClaw, include the SKILL.md content in context.

What are this agent's strengths and limitations?

Pros
  • Zero-auth: All data sources except iwencai are free and keyless, out-of-box usable.
  • Clear architecture: 10 layers covering everything from quotes to investor interaction; 47 endpoints.
  • Built-in fallbacks: If primary sources are blocked, official exchange endpoints and others provide degradation.
  • Single self-contained file: Easy to distribute and portable, works offline.
Limitations
  • Relies on multiple third-party data sources; interfaces may change or close (e.g., Eastmoney has rate limits).
  • Some sources like iwencai require API key, not completely free.
  • Beijing Stock Exchange old code segments are deprecated; new 920 codes needed, otherwise stale quotes.
  • Requires domestic IP for mootdx; overseas deployment may timeout.

How does this agent compare with similar options?

In the A-share data space, common alternatives include akshare (Python wrapper) and tushare (requires token). This project removed akshare dependency in V3.0 due to intermediate failure points; tushare needs credits. Compared to commercial terminals like Wind or Choice, this is free but may lack full breadth.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
A-Share Full-Stack Data Toolkit This agent 52 · Major gaps Agent plugin / skillFree ★ 11k 7d ago Python Claude Code
OpenBB Open Data Platform 37 · Major gaps Library / SDKFreemium ★ 74k today Python —
FinRobot 51 · Major gaps CLIFree + model costs ★ 8.2k 20d ago Python OpenAI API
ValueCell Financial Agent Hub 48 · Major gaps Desktop appFree + model costs ★ 11k 8mo ago Python OpenAI API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
52/ 100 5-point scale 2.6 / 5
This review covers the source as of Aug 09, 2026. The project has shipped 8 stable release(s) since, which have not been re-reviewed. The score and verdict describe the reviewed version only. Recent releases ↓
Trust 7/29
Reliability 9/14
Adaptability 12/18
Convention 12/18
Effectiveness 9/13
Verifiability 3/8
Why each dimension lost points
Trust7 / 29 · 1.2/5

Evidence: README states zero-auth, no API keys (except iwencai), data sources are public HTTP APIs, no excessive permissions or sensitive data collection; dependencies are minimal (mootdx, requests, pandas, stockstats), no known vulnerabilities or malicious behavior; external effects limited to network requests with fallback strategies; source attribution clear (author, email, X). Deductions: no user confirmation mechanism, data flow transparency partial (how data is used by agent not explained), sensitive data handling not mentioned, rollback mechanism not mentioned.

Reliability9 / 14 · 3.2/5

Evidence: README internally consistent, endpoint count explained; dependency availability discussed (mootdx unmaintained but protocol works, httpx conflict has workaround); failure messages specific (403, HTTP 000, stale quotes). Deductions: no runtime verification, but static review does not require it.

Adaptability12 / 18 · 3.3/5

Evidence: clear target users (AI coding assistant users), rich scenarios (valuation, research, fund flows); capability boundaries clear (endpoint list, source priority); trigger descriptions specific (example phrases); environment fit discussed (overseas needs proxy, Python version). Deductions: none.

Convention12 / 18 · 3.3/5

Evidence: clear information architecture (ten-layer, endpoint list); detailed install notes (3 steps); naming stable (version numbers, endpoint names); examples and FAQ extensive; known limitations documented (BSE old codes, Eastmoney IP bans); License Apache-2.0; CHANGELOG present; maintenance responsibility clear (author, Issue channel). Deductions: none.

Effectiveness9 / 13 · 3.5/5

Evidence: high output usability (structured data, built-in workflows); high marginal value (integrates multiple sources, fallbacks); reasonable cost-benefit (free, zero-auth). Deductions: none.

Verifiability3 / 8 · 1.9/5

Evidence: some claims have specific data (e.g., 2026-07-31 test), but most claims lack independent verification; cross-source corroboration limited (fallbacks mentioned but not verified); fact vs inference separation unclear (e.g., 'no IP ban' is inference). Deductions: lack of traceable test evidence.

Risks and how to mitigate them
  • Not found in source: confirmation before actingTurn on (or add) a confirmation step before it acts, and try it in a sandbox or test environment before real data.
  • Not found in source: sensitive-data handlingUse dedicated, low-privilege, revocable API keys — never production credentials — and keep secrets out of logs.
  • Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
  • Static review cannot verify actual runtime behavior; all claims based on README and code structure.
  • Dependency mootdx is unmaintained, potential compatibility issues; monitor alternatives.
  • Eastmoney APIs risk IP bans; use rate limiting and fallbacks.
  • BSE old codes may cause data errors; use new codes.
Evidence confidence: Low Reviewed Aug 09, 2026 Reviewed revision 3a3149dedbe3 New commits since this review; the score may not cover them
Review evidence README.mdLICENSE
See the full review method →

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v3.10.2 v3.10.2 — PE 消化年数修正(#58)
    Release notes excerpt
    十五层、87 个入口、34 个来源都不变。只修 full_valuation() 的 PE 消化年数。 修复 full_valuation() 在盈利不增长时把 PE 消化年数报成 0 年(#58) 前向 PE 高于 30x、下一年一致预期盈利持平或下降时,digest_years 原来返回 0,读起来像「已经消化到 30x」, 实际是永远消化不到。同一份文档里的 pe_digestion() 对这种情况本来就返回无穷大,full_valuation() 没有复用它。 现在改为调用 pe_digestion(),得不出有限年数时返回 None(JSON 里是 null): - 当年 EPS 为正、前向 PE 不高于 30x:0,不变。 - 当年 EPS 为正、前向 PE 高于 30x、预期增长为正:返回消化年数,不变。 - 前向 PE 高于 30x,而下一年预测缺失或盈利不增长:None(原来是 0)。 - 当年 EPS 缺失或不为正:None(原来是 0)。 「完整调研流程」里「流程 B:批量估值对比」的打印对 None 显示「无法估算」,不再打出「消化=None年」。 感谢 @KennyMcSimpson 发现问题并提交修复。 测试 …
    View on GitHub ↗
  2. v3.10.1 v3.10.1 — 成交量单位更正(#57)/ 逐笔提速与盘后核对
    Release notes excerpt
    十五层、87 个入口、34 个来源都不变,返回的数据也不变。§1.2 只改文档;§1.4 逐笔和 §13.7 期货日 K 修的是 v3.10.0 发版后补做代码复审查出的问题,§1.4 多了一个 frame.attrs["complete"]。 修复 §1.2 tencent_kline() 的成交量单位写错了:科创板是股,不是手(#57) §1.2 的返回列、函数说明,以及「备用源速查」里的腾讯分钟 K 线字段说明,都把成交量写成「手」。 2026-10-05 对照 §1.3 通达信官网盘后包(单位:股)实测:腾讯 K 线对科创板(688 / 689)返回股,其余返回手—— 沪深主板、创业板、B 股、ETF(含科创板 ETF 588)、LOF、REITs 1 手 = 100 股 / 份,可转债 1 手 = 10 张,指数也是手。 日周月线、分钟线、复权与否都是同一规则。 照旧文档换算,科创板的成交量会大 100 倍;备用源速查里「成交额 = 量(手) × 100 × 均价」对科创板、可转债(1 手 = 10 张)也是错的,现按品种写全,指数不适用。 返回值本身不改,免得老用户拿到的数在不知情的情况下变了;只把文档改成实测结果。 §1.4 逐笔的量科创板也是手,那一节原本就写对了,补了一句「和 §1.2 不同」。 …
    View on GitHub ↗
  3. v3.10.0 v3.10.0 — 当日逐笔 / 期货日 K(含大商所)/ 行情层重排
    Release notes excerpt
    新增 2 个能力入口,来源数不变:十五层、87 个入口(82 主入口 + 5 备胎)、34 个来源。 通达信公开服务器的 K 线 / 盘口 / 逐笔命令 2026-09 起返回空(#52),本版补上逐笔的替代来源,并把行情层的可用来源排到前面。 Breaking Changes - Layer 1 重新编号,可用来源在前、mootdx 放最后留档。旧 → 新: 1.2 腾讯财经 → 1.1、1.5 腾讯 K 线 → 1.2、1.6 通达信盘后包 → 1.3、(新增)腾讯逐笔 → 1.4、 1.3 百度 → 1.5、1.4 新浪复权因子 → 1.6、1.1 mootdx → 1.7。函数名与签名都没变,只影响按 § 编号查找。 本文件更早的条目和 SKILL.md 开头的历史版本说明仍用旧编号。 新增 - §1.4 tencent_ticks(code):腾讯当日逐笔成交(分笔,约 3 秒一笔),替代失效的 mootdx transaction()。 覆盖沪深个股(含创业板、科创板)与 ETF,只有最近一个交易日,北交所与指数直接报错。 …
    View on GitHub ↗

FAQ

pip install mootdx causes httpx version conflict; what to do?
Use pip install --no-deps "httpx>=0.27.1" to upgrade httpx; mootdx still works as it uses TCP protocol, not httpx. Or use a separate venv.
Eastmoney API returns 403 or connection reset; how to handle?
Stop requests and wait 30-60 minutes (IP-level bans usually auto-release), or switch network (e.g., mobile hotspot), and increase EM_MIN_INTERVAL to reduce frequency.
Why no research reports for Beijing Stock Exchange stocks?
Old code segments are deprecated; new 920 codes needed. V3.6.0 returns is_stale or throws ValueError to avoid misinterpretation.
SKILL.md is large; will token usage be high each load?
Since V3.3.1, description scope is narrowed to avoid unnecessary loading; or install as non-auto-trigger skill and read relevant sections on demand, usually only a few thousand tokens.
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related agents