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.
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.
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.
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.
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.
Evidence: high output usability (structured data, built-in workflows); high marginal value (integrates multiple sources, fallbacks); reasonable cost-benefit (free, zero-auth). Deductions: none.
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.
- 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.
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.
- Individual investors using Claude Code to quickly query stock valuations (e.g., 'Estimate 688017, give PE/PEG/absorb time').
- 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?').
- Financial news editors using Cailianshe telegraph for real-time market alerts and monitoring major news.
- Investment analysts using iwencai for themed research (e.g., 'Recent reports on humanoid robotics supply chain, especially screws and reducers').
- 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?').
- Options traders querying IV and Delta of ETF options (e.g., 'What are the ATM option IV and Delta for 50ETF?').
What are this agent's strengths and limitations?
- 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.
- 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 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.
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.
FAQ
pip install mootdx causes httpx version conflict; what to do?
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.