# A-Share Data API (ashareapi.com) > A-share (China) market data API for AI agents and developers: **32 endpoints** (29 data endpoints + 3 utility endpoints: health check / PoW challenge / usage) covering quotes / K-line / **five-level order book** / financials / money flow / top-trader boards / sectors / valuation / macro / convertible bonds / ETFs / IPOs / research / factor screening. **5 data endpoints work without an API key** (quote / K-line / hot list / market overview / breadth). Plug into Claude Code / Cursor / Codex / CodeBuddy and 15 more clients via one MCP URL (24 tools), or install the **Agent Skill** into 45+ Agent Skills clients. Multi-source data channels (automatic failover + cross-checks). Unified response envelope: `{ ok, endpoint, tier, elapsed_ms, source, data }`. Symbols use a market prefix: `sh600667` (Shanghai) · `sz000001` (Shenzhen) · `bj8xxxxx` (Beijing) · `hk00700` (Hong Kong) · `usAAPL` (US) · `sh113052` / `sz123138` (convertible bonds) · `pt01801780` (SW sector). ## Quick start - [Docs](https://ashareapi.com/en/docs/): get data in 3 steps · auth · integration guides (MCP / Python / Node.js / data analysis) - [Agent Skill](https://ashareapi.com/en/skill/): one folder installs into 45+ AI clients (Claude Code / Cursor / Codex / opencode …) and the AI then knows how to fetch from this API - [Endpoint reference](https://ashareapi.com/en/endpoints/): every endpoint with parameters and multi-language examples - [Error codes](https://ashareapi.com/en/docs/errors/): 401 / 403 / 429 / 422 and upstream-failure mapping - [Pricing & keys](https://ashareapi.com/en/pricing/): free endpoints need no key · Trial ¥9.9 / 10k calls · Standard ¥29.9 / 100k · Pro ¥99 / 500k · Unlimited ¥199 / month ## Endpoints (29 · each has its own page at /en/docs/endpoints/{id}/) > 29 = **26 data endpoints** (5 free + 21 key-required) + **3 utility endpoints** (`/v1/health` · `/v1/challenge` anonymous quota boost · `/v1/usage`, key required) ### Data endpoints · free (no key required) - `/v1/quote` — real-time snapshot (price / OHLC / turnover) · [docs](https://ashareapi.com/en/docs/endpoints/quote/) - `/v1/kline` — K-line (day / week / month) · [docs](https://ashareapi.com/en/docs/endpoints/kline/) - `/v1/hot` — hot list (default 30, max 50) · [docs](https://ashareapi.com/en/docs/endpoints/hot/) - `/v1/market-overview` — market overview (profile / breadth / style rotation / valuation percentile) · [docs](https://ashareapi.com/en/docs/endpoints/market-overview/) - `/v1/changedist` — advance/decline distribution · [docs](https://ashareapi.com/en/docs/endpoints/changedist/) ### Data endpoints · API key required (21) - Financials & fundamentals: `/v1/finance` (three statements) · `/v1/profile` · `/v1/dividend` · `/v1/shareholder` · `/v1/chip` - Money flow & trading: `/v1/fund` (money flow + top-trader boards + block trades + margin) · `/v1/lhb` (top-trader boards: institutions / hot money / active seats) · `/v1/margin-trade` · `/v1/block-trade` - Quotes & indicators: `/v1/technical` (MA / MACD / KDJ / RSI / BOLL) · `/v1/events` (42 event tags) - Sectors: `/v1/sector` · `/v1/sector-valuation` (with historical percentile) - Quant screening: `/v1/screen` (multi-factor expression) - Macro & fixed income: `/v1/macro` (GDP / CPI / PMI / LPR) · `/v1/bond` (convertible bond terms) · `/v1/etf` - Calendars & research: `/v1/ipo` · `/v1/dehydrated` · `/v1/calendar` - Search: `/v1/search` (symbol disambiguation) ### Utility endpoints (3) - `/v1/health` — health check (no key) - `/v1/challenge` — anonymous quota boost: solve one PoW to raise the anonymous limit from 5/min to 60/min (no key) - `/v1/usage` — your quota and remaining calls (key required) ## Free endpoints (try without signing up) > ⚠️ **Two hosts**: every link in this file lives on the **content host `ashareapi.com`** (crawl-friendly). > Actual calls go to the **API host `api.ashareapi.com`** — its `robots.txt` is `Disallow: /`, which exists **only to keep crawlers off the API**, **not to block AI**. Call examples are on each endpoint page. - Quote → https://ashareapi.com/en/docs/endpoints/quote/ - K-line → https://ashareapi.com/en/docs/endpoints/kline/ - Hot list → https://ashareapi.com/en/docs/endpoints/hot/ - Market overview → https://ashareapi.com/en/docs/endpoints/market-overview/ - Breadth → https://ashareapi.com/en/docs/endpoints/changedist/ Anonymous calls are rate-limited per source (5/min; solve one PoW challenge for 60/min via `/v1/challenge`). ## A-Share Daily Report (three slots per trading day · free · citable) Every trading day we publish three auto-generated reports. **Both the HTML page and the Markdown version may be freely cited** (please attribute `ashareapi.com`): | Slot | Generated (CST) | URL pattern | |------|-----------------|-------------| | Pre-market brief | 09:15 | `https://ashareapi.com/daily/{YYYY-MM-DD}-pre.html` | | Midday update | 11:40 | `https://ashareapi.com/daily/{YYYY-MM-DD}-noon.html` | | Post-close review | 15:05 | `https://ashareapi.com/daily/{YYYY-MM-DD}-post.html` | - Index (all archives): https://ashareapi.com/daily/ - Markdown version (**recommended for AI reading**): replace `.html` with `.md`, e.g. `https://ashareapi.com/daily/2026-09-22-pre.md` - Discovery: https://ashareapi.com/daily/sitemap.xml Each report contains: index levels (close / change / turnover), market breadth & sentiment (temperature, limit-ups, failure rate, top board, return distribution), limit-up ladder (consecutive-board tiers + reason clustering), sector rotation (leaders/laggards + net main-capital inflow + related headlines), **strong-stock industry-chain positioning** (node / position / relevance / business description), institutional block-trade list, market heat, news wire (multi-source: Tencent 7x24 / Cailianshe / Jin10 / Baidu), and a sources & methodology section. > Method notes: advancers/decliners come from tick-level tallies and may differ from media "all-account" figures; turnover is the Shanghai + Shenzhen total. All content is **objective data compilation, not investment advice**. ## Authentication - Recommended: header `Authorization: Bearer ` (get a key at https://ashareapi.com/en/pricing/, format `ct-xxxxxxxx`) - Quick test only: `?key=` query parameter (production should use the header so keys never end up in logs) ## AI agent integration (MCP) - [MCP setup](https://ashareapi.com/en/mcp/): put the **API address** `https://api.ashareapi.com/mcp` in your client config (API host, programmatic use only); configs for all 19 clients live on that page - [AI crawler list & verification](https://ashareapi.com/en/docs/ai-crawlers/): international and China crawlers with official sources and IP ranges, the training/search/user-triggered split, and common blocking mistakes - **24 MCP tools** (the first 5 need no key): `ashare_quote` · `ashare_orderbook` · `ashare_snapshot` · `ashare_kline` · `ashare_finance` · `ashare_fund` · `ashare_technical` · `ashare_shareholder` · `ashare_events` · `ashare_lhb` · `ashare_screen` · `ashare_sector` · `ashare_sector_valuation` · `ashare_market_overview` · `ashare_changedist` · `ashare_hot` · `ashare_macro` · `ashare_bond` · `ashare_etf` · `ashare_ipo` · `ashare_dividend` · `ashare_dehydrated` · `ashare_search` · `ashare_usage` - OpenAPI spec (content host, crawlable): https://ashareapi.com/openapi.json ## Comparisons - [vs Tushare](https://ashareapi.com/en/compare/tushare/): hosted service vs credit-based platform - [vs AkShare](https://ashareapi.com/en/compare/akshare/): hosted API vs open-source library - [vs BaoStock](https://ashareapi.com/en/compare/baostock/): hosted API vs a free historical database (intraday bars / adjustment factors vs real-time snapshots and structured money-flow surfaces) - [Migrating from Tushare](https://ashareapi.com/en/docs/migrate-from-tushare/): endpoint mapping, four-step rewrite, field mapping — including what **cannot** move (minute bars, news/filings full text, index bars, trading calendar) - [Tutorials & guides](https://ashareapi.com/en/docs/guides/): organised by task — e.g. "Getting A-share quotes with Python: three approaches" (runnable code, field notes, rate-limit handling, boundaries of each approach) ## Tutorials (with runnable code) - [Getting A-share quotes with Python: three approaches](https://ashareapi.com/en/docs/guides/python-ashare-quotes/): HTTP API vs data SDK vs scraping — trade-offs, rate limits, common errors - [A-share top-trader boards with Python: four approaches](https://ashareapi.com/en/docs/guides/longhubang-data/): institution / hot-money / active-seat boards · CNY units and the string-value gotcha - [A-share data with the Python SDK (pip install ashareapi)](https://ashareapi.com/en/docs/guides/python-sdk/): 32 endpoints · 5 free endpoints need no key · DataFrames and 5 exception types - [A-share data with the Node.js / TypeScript SDK (npm install ashareapi)](https://ashareapi.com/en/docs/guides/nodejs-ashare-quotes/): 32 endpoints · zero runtime dependencies (native fetch) · TypeScript types · arrays of objects and 5 exception types - [Quantifying A-share market mood](https://ashareapi.com/en/docs/guides/market-mood/): advancers/decliners, limit-ups, turnover, style rotation (all free endpoints) · current vs T-1 gotcha - [A-share sector rotation](https://ashareapi.com/en/docs/guides/sector-rotation/): sector gainers + valuation percentiles + industry-chain positioning (pt code format) - [Financial red flags for A-share stocks](https://ashareapi.com/en/docs/guides/financial-redflags/): three-statement cross-checks, shareholder-count spikes, lock-up expiries, dividend continuity - [Migrating from AkShare](https://ashareapi.com/en/docs/guides/migrate-from-akshare/): function-to-endpoint mapping, code-format conversion (600667 → sh600667), field mapping and rate-limit handling - [Monitoring convertible-bond redemption and double-low](https://ashareapi.com/en/docs/guides/convertible-bond-alerts/): double-low / premium / conversion value / call trigger · parsing the Markdown payload and spotting redemption risk early - [Reading main capital flow](https://ashareapi.com/en/docs/guides/main-capital-flow/): main-capital net inflow (today / 5 / 10 / 20-day) + market rank + top-trader seat detail · four common misreadings - [Migrating from Tushare](https://ashareapi.com/en/docs/migrate-from-tushare/): endpoint mapping, ts_code prefix conversion, field mapping - [MCP setup with Claude Code](https://ashareapi.com/en/docs/guides/mcp-claude-code/): one command plus per-client config - [AI quant with MCP](https://ashareapi.com/en/docs/guides/ai-quant-mcp/): separating data from validation, a backtest skeleton, decision thresholds - All tutorials: https://ashareapi.com/en/docs/guides/ ## Optional - [Status](https://ashareapi.com/en/status/) - [Changelog](https://ashareapi.com/en/changelog/) - [Terms](https://ashareapi.com/en/terms/) - [中文站点](https://ashareapi.com/): Chinese version (llms.txt: https://ashareapi.com/llms.txt) > Note: this service provides data endpoints and tooling. **Not investment advice.** - [Agent Skill discovery index](https://ashareapi.com/.well-known/agent-skills/index.json): standard skill discovery endpoint (with sha256 digest for update checks)