> Source: https://ashareapi.com/en/compare/baostock/  ·  Markdown version for LLMs / AI agents

Comparison

# ashareapi vs BaoStock
 BaoStock is a free A-share historical database — a Python library you pip-install that talks to their own data server (SDK free; their site also sells paid traffic packages). We are a hosted service: nothing to install, callable over HTTP and MCP, with real-time snapshots and money-flow surfaces.

 Bottom line
 **Only need historical K-line (including intraday) and quarterly financials, zero budget, Python-only** → BaoStock. **Need real-time, money flow / top-trader boards / sectors, zero maintenance and AI access** → us.

## Side by side
 |
| | | ashareapi (us) | BaoStock

| | Access | Nothing to install: plain HTTP; one MCP config for AI Agents | `pip install baostock` — a Python library you call in code (returns pandas DataFrames)

| | Cost | Free endpoints need no key; buyout from ¥9.9 / Unlimited ¥199 per month | **SDK is free** (their description: Free china stock market data); their site also sells paid **traffic packages** with a points system (payment / order pages exist)

| | Login / auth | No key for free endpoints; paid endpoints use `Authorization: Bearer ` | Session-based `bs.login()` / `bs.logout()` — **no credentials, no signup**

| | Languages | Any language (HTTP): Python / JS / Go / Excel, plus official Python and Node SDKs | **Python only** (a library, not an HTTP API)

| | Real-time data | **Included** (free endpoints include a real-time quote snapshot) | Positioned as **historical data** (their package description: obtaining **historical** data of China stock market)

| | Intraday bars | ❌ Not offered (we do not do minute-level) | ✅ Yes — `frequency` supports 5 / 15 / 30 / 60-minute bars, plus daily / weekly / monthly

| | Adjustment | The basis is **fixed at forward-adjusted** (no parameter, no adjustment factors) | Three modes via `adjustflag` (1 back / 2 forward / 3 unadjusted) **plus separate adjustment factors** (`query_adjust_factor`)

| | Coverage | 32 endpoints: quotes / financials / money flow / top-trader boards / sectors / macro / convertible bonds / factor screening | **40 query functions** in the SDK: historical K-line + quarterly financials (profit / operation / growth / solvency / cash flow / DuPont) + earnings flash & forecasts + index constituents + industry / concept + macro (CPI / PPI / PMI / money supply); **no** money flow / top-trader boards / sector quotes / convertible bonds / factor screening

| | Data source | **70 public sources** pooled, auto-failover + cross-checks | **Their own data server** (their words: "We have our own data server") — a single source, no failover path

| | Maintenance | We maintain it: rate limiting, caching, health checks; endpoints evolve server-side (**no SDK upgrade needed**) | The library is still released (0.9.4 · 2026-09-21); data comes from their server

 Access
 Nothing to install: plain HTTP; one MCP config for AI Agents
 `pip install baostock` — a Python library you call in code (returns pandas DataFrames)

 Cost
 Free endpoints need no key; buyout from ¥9.9 / Unlimited ¥199 per month
 **SDK is free** (their description: Free china stock market data); their site also sells paid **traffic packages** with a points system (payment / order pages exist)

 Login / auth
 No key for free endpoints; paid endpoints use `Authorization: Bearer `
 Session-based `bs.login()` / `bs.logout()` — **no credentials, no signup**

 Languages
 Any language (HTTP): Python / JS / Go / Excel, plus official Python and Node SDKs
 **Python only** (a library, not an HTTP API)

 Real-time data
 **Included** (free endpoints include a real-time quote snapshot)
 Positioned as **historical data** (their package description: obtaining **historical** data of China stock market)

 Intraday bars
 ❌ Not offered (we do not do minute-level)
 ✅ Yes — `frequency` supports 5 / 15 / 30 / 60-minute bars, plus daily / weekly / monthly

 Adjustment
 The basis is **fixed at forward-adjusted** (no parameter, no adjustment factors)
 Three modes via `adjustflag` (1 back / 2 forward / 3 unadjusted) **plus separate adjustment factors** (`query_adjust_factor`)

 Coverage
 32 endpoints: quotes / financials / money flow / top-trader boards / sectors / macro / convertible bonds / factor screening
 **40 query functions** in the SDK: historical K-line + quarterly financials (profit / operation / growth / solvency / cash flow / DuPont) + earnings flash & forecasts + index constituents + industry / concept + macro (CPI / PPI / PMI / money supply); **no** money flow / top-trader boards / sector quotes / convertible bonds / factor screening

 Data source
 **70 public sources** pooled, auto-failover + cross-checks
 **Their own data server** (their words: "We have our own data server") — a single source, no failover path

 Maintenance
 We maintain it: rate limiting, caching, health checks; endpoints evolve server-side (**no SDK upgrade needed**)
 The library is still released (0.9.4 · 2026-09-21); data comes from their server

 When to pick us

-
 You need **real-time** quote snapshots (BaoStock is a historical-data tool)

-
 You need money flow / top-trader boards / sectors / convertible bonds / factor screening

-
 Non-Python environments (JS / Go / Excel / low-code)

-
 You want data **inside an AI Agent** (one MCP config)

-
 You would rather not maintain a data pipeline yourself

 When to pick BaoStock

-
 Zero budget and you are **committed to Python**

-
 You need **intraday historical bars** (5 / 15 / 30 / 60 minutes)

-
 You need **adjustment factors** to compute any adjusted series yourself

-
 You want quarterly financials / index constituents / industry & concept / macro for research

-
 You are happy with a DataFrame workflow and owning the pipeline

 Honest boundary
 Honest boundary: BaoStock’s **SDK is free** (their site also sells paid traffic packages) and it offers two things we do **not** — **intraday historical bars** and **adjustment factors**; its quarterly financial coverage is solid too. What we sell is not "more historical data" but **hosting and availability**: real-time snapshots, structured money-flow surfaces, **multiple data sources backing each other up and switching automatically when one has a problem**, zero maintenance and native AI Agent access. Many users **combine both** — history and intraday from BaoStock, real-time and structured surfaces from us.

## FAQ
 BaoStock is free — why pay you?
 Its **SDK is free** with strong historical coverage (their site also sells paid traffic packages), but it is a **local Python library**: Python only, historical data only, and no money flow / top-trader boards / sectors / convertible bonds — and no real-time quotes at all. We provide a hosted API (any language + MCP), real-time snapshots, structured money-flow surfaces, and the stability of **several data sources backing each other up and switching automatically when one has a problem** — and you never maintain the pipeline.

 Do you have intraday (minute) data?
 No — we do not do minute-level quotes. For intraday history (5 / 15 / 30 / 60 minutes) use BaoStock or Tushare. That is our boundary, stated openly.

 Is the price-adjustment basis the same?
 No, and this is the most common source of mismatches: our basis is **fixed at forward-adjusted** (no parameter), while BaoStock lets you switch between **back-adjusted / forward-adjusted / unadjusted** via `adjustflag` and also exposes adjustment factors. Align the basis and the data date before comparing; ours is forward-adjusted, so **do not adjust again** (double adjustment).

 Can I use both?
 Yes, and it is common: historical K-line (including intraday) and quarterly financials from BaoStock (free), real-time snapshots, money flow, top-trader boards and AI Agent access from us.

 Will the numbers match?
 Closing prices for the same stock usually do. When they differ, check three things first: ① the adjustment basis (ours is forward-adjusted) ② the data date (our last bar is the most recent trading day) ③ whether the window crosses an ex-dividend date. If the gap lands **exactly on windows crossing an ex-dividend date**, it is a basis difference, not a data error.

 Source: BaoStock official PyPI package description (baostock 0.9.4, published 2026-09-21 — the "free / own data server / historical" wording is theirs) and the SDK source (40 `query_*` functions and `adjustflag` values inside the wheel), verified 2026-09-28; site: www.baostock.com. Pricing and features are subject to change — check the official source.

 Want to try first?
 Free endpoints need no key. Buy a key once it works for you.

 [Quick start](/en/docs)[Pricing](/en/pricing)

 [← All comparisons](/en/compare)
