Tutorials & guides
Organised by "what you are trying to do": runnable code, trade-offs, and the parts we cannot do (stated plainly).
Three options: call an HTTP API directly, install a data SDK, or scrape pages. Start with the first — no signup, the least code, and the price you get is live; below are runnable samples, trade-offs, and when not to use each.
ReadMCP lets your AI Agent fetch real data instead of answering from memory. Set it up once — paste https://api.ashareapi.com/mcp; free tools need no key at all.
Configure MCP once and the AI Agent fetches quotes, financials and money flow itself in chat; backtesting and adjudication stay with you — here is the full flow with copy-paste code.
ReadFour options: call an HTTP API directly, Tushare, AkShare, or scrape pages. Start with the first — it returns institution, hot-money and active-seat boards in one call (other routes usually give only flat detail rows). Below: runnable code and when not to use each.
ReadThe official SDK is live: pip install ashareapi. Six endpoints need no key, results come back as pandas DataFrames (plain list[dict] without pandas), symbol formats are forgiving, and 5 exception types tell you exactly what to do.
The official Node SDK is live: npm install ashareapi. Six endpoints need no key, it has zero runtime dependencies (native fetch), ships full TypeScript types, returns arrays of objects, accepts forgiving symbol formats, and 5 exception types tell you exactly what to do.
Mood is not a feeling — it is numbers: breadth, limit-up counts, turnover, style rotation. Three free endpoints are enough to read "how hot is the market today". Code and caveats below.
ReadSectors reveal direction earlier than single stocks: rankings find strength, valuation percentiles judge price, supply chains show the logic. Three endpoints make one sector check-up — code below.
ReadAvoiding landmines beats picking winners: profits without cash, surging holder counts, large lock-up expiries — all visible in public data through four endpoints. This tutorial identifies risks only; it makes no recommendations.
ReadAkShare wins on breadth; we win on not having to maintain it yourself. If you already use AkShare and are tired of "upstream redesign → broken function", migration is three changes: code format, call style, field names. Below is the mapping and runnable code — and the parts that do not migrate.
ReadTwo things convertible-bond holders fear most: missing a redemption announcement (the premium vanishes overnight) and buying at a high premium. Both are visible up front in one /v1/bond call — below is the screening and warning code.
Money flow is not a price predictor — it is a thermometer for participation and the direction of chips. One /v1/fund request returns main-capital inflow (today / 5 / 10 / 20-day) + market rank + top-trader detail. The hard part is reading it; code and four common misreadings below.
Factor screening turns financial and market metrics into conditions and filters the whole market. This guide covers three things: how to write the expression, how to read the result, and why you must run a data health check afterwards (otherwise it is easy to mistake an outlier for an opportunity).
ReadThe previous guide covered how to screen; this one covers how to write conditions: expression structure, operators, unit traps, and a lookup-ready 85-factor dictionary. Written to be copied and run.
ReadDo not want to write screening conditions yourself? The API ships 22 ready-made strategies (called preset in the interface): low PE, high dividend, high ROE, growth, main-capital inflow and more — tweak and run. This guide walks them by category: what each screens, who it suits, and what the output looks like — with live results from five of them.
The previous three guides covered syntax, factors and ready-made strategies. This is the full walkthrough: write a four-condition value screen, run it, then investigate the top result in depth to show how a "looks like free money" value is verified as unusable step by step.
ReadA block trade is a large off-orderbook transfer agreed between two parties. It never shows on the intraday chart, yet it often reveals intent before price moves. This guide covers: how to read the fields, what the discount rate means, and how to scan in bulk with Python (with live 2026-09-29 data).
ReadHolder count is the most direct public signal of "whose hands are the chips in": a falling count = concentration in fewer hands (often positive), a surging count = dispersion (retail crowding in). This guide covers the three tables, the fields, and a real case.
ReadWith raw K-lines, indicators are easy to compute yourself - no expensive tools needed. This guide uses the free endpooint for forward-adjusted daily bars and writes MA / MACD / RSI / KDJ / BOLL in pure Python + pandas, no TA-Lib.
ReadMarket breadth (advancing vs declining) is the most direct way to tell whether "today was a broad rally or a split" — it reflects the true sentiment of the whole market better than a single index. This guide uses a free endpoint, covering how to read temperature, track several days, and spot a turning point.
ReadGetting "what is this stock worth right now" takes one GET: /v1/quote is free, needs no Key and no signup, and returns the last 30 trading days of OHLC plus volume/value/turnover. data[0] is the most recent day.
Scanning all 5,000+ A-shares one by one costs 5,000+ requests. With batch endpoints at 250 symbols per call it takes 23. Table, code and quota rules below.
ReadChatGPT Sites turns a prompt into a web page, and the data comes from one fetch in the browser. The free endpoints send access-control-allow-origin: *, so no backend and no key — call them straight from the page. Runnable code below.
ReadConnect A-share data inside Today with a custom MCP server: set it up on your phone, with no desktop and no SDK. Configure once, then ask for quotes, financials and K-lines.
ReadGrok Bot supports custom remote MCP servers: add a public URL and a Bearer header, then ask for A-share quotes, financials and K-lines inside the Bot.
ReadMuse is Meta’s personal AI Agent. It has no native MCP settings page, but a custom connector can point at our remote MCP server, so you can query A-share data from mobile or Mac.
ReadDots is OpenAI’s always-on agent. It uses the user’s own ChatGPT connectors; add our remote MCP as a ChatGPT plugin and Dots can query A-share data.
ReadDuet is Claude’s always-on agent. It inherits the user’s own Claude connectors; add a custom connector in Claude first, then Duet can query A-share data.
ReadToday, Grok Bot, Muse, Dots and Duet can do real work, but they do not understand A-shares by default. Connect ashareapi over MCP and ask for quotes, financials and K-lines from a personal agent on your phone.
Read