Install from PyPI
Add the SDK to notebooks, scripts and scheduled research jobs with pip.
Query A-share prices, ETFs, financials, capital flows, factors, and realtime data as pandas DataFrames through methods backed by the same public API contract.
Add the SDK to notebooks, scripts and scheduled research jobs with pip.
Use QUANTSONAR_TOKEN or call qs.set_token() once.
Call named methods with public symbol and date parameters.
The SDK handles authentication and converts responses into DataFrames. Security symbols include the exchange suffix, such as 600519.SH.
pip install quantsonar import quantsonar as qs qs.set_token("qs_your_key") df = qs.daily( symbol="600519.SH", start_date="20260101" )
For repeatable environments, set QUANTSONAR_TOKEN. See the China stock API authentication section for errors and key handling.
Use the QuantSonar MCP server for tool-capable agents, or REST API for a language-neutral integration.
FREE includes core daily and reference data. Compare expanded coverage and throughput on the pricing page.
Create a free API key