a-stock-data is a Python toolkit that aggregates Chinese A-share stock market data from multiple sources into a unified interface designed for AI programming assistants.
The tool solves the problem of fragmented access to A-share market data by consolidating raw data from nineteen different sources into a single, authentication-free package. It wraps away implementation details like specific API parameters, authentication headers, and source-specific quirks, exposing them through a structured skill file compatible with AI coding assistants. The architecture spans eleven layers covering real-time quotes, research reports, fundamental data, and other market information. When a primary data source becomes unavailable, the tool includes fallback strategies and alternative sources to maintain functionality.
The toolkit is built for developers and AI agents working on quantitative finance, investment research, or trading applications in the Chinese market. It suits projects that need rapid prototyping with A-share data without managing authentication or learning multiple API conventions. The skill file format works with Claude Code, OpenAI Codex, and other AI assistants that support context injection, making it particularly valuable for AI-assisted financial analysis workflows. Developers can activate the tool by referencing it in their AI assistant's context or system prompt.
The project maintains active development with structured versioning and documented changelog entries. The codebase includes fallback mechanisms and degradation strategies beyond the core eleven-layer architecture, showing attention to reliability under real-world conditions where data sources may become temporarily unavailable. The tool provides both primary and backup data source implementations with explicit speed lookup tables for switching between them.