PYTHON SDK

Python SDK for China Stock Data

Use the official quantcoda package to bring China A-share stocks, ETFs, indices, financials and money flow into Python and pandas. The hosted API keeps public parameters and fields aligned across Python, REST and MCP.

Get a free API key Read the documentation

Query China stock data in three steps

Install the SDK, set your QuantCoda API key and query by security symbol and date. Results arrive as pandas DataFrames ready for validation, transformation and research.

# Python 3.9+
pip install quantcoda

import quantcoda as qc
qc.set_token("qc_live_your_key")
df = qc.daily(symbol="600519.SH", start_date="20260101")
print(df.head())

A Python API shaped for quantitative research

45 DATA ENDPOINTS

Market, company and capital context

One SDK covers stocks, ETFs, indices, financials, valuation, money flow, chip distribution, realtime quotes and financial news.

PANDAS FIRST

Continue directly in your workflow

Tabular responses become DataFrames for filtering, joins, statistics, visualization and research pipelines.

ONE CONTRACT

Aligned with the REST API

Python methods retain public symbol, date and filter parameters instead of introducing a second naming model.

OFFLINE DISCOVERY

Search interfaces offline

Endpoint metadata ships with the package. Use qc.search(), qc.interface_info() and qc.list_categories() to discover capabilities without a network request.

Python coverage for China stock research

Use one package for the research objects developers most often need to combine. Start with the China A-Share Market Data API, then move into dedicated China ETF data, stock financial data and money-flow data without changing authentication or symbol conventions.

MARKET & ETF

Prices, reference data and funds

Query daily bars, adjustments, indices, ETF NAV, fund size, tracking indices and holdings as pandas DataFrames.

FINANCIALS & FLOWS

Company and capital context

Join statements, indicators, valuation and capital-flow records through exchange-qualified symbols and explicit dates.

Choose your next step

Explore the China A-Share Market Data API coverage or go directly to the API documentation. For AI-led workflows, the same API key connects to the China Stock MCP Server.