easyquotation is a Python library that provides access to Chinese stock market data, including real-time quotes, historical daily candlestick prices, exchange-traded fund details, and a stock code database sync utility. It retrieves live trading data from Chinese exchanges, A-shares, and Hong Kong listed stocks without requiring manual API key configuration, offering a unified interface to multiple public data feeds.
The library combines several market data providers behind a single query interface, using asynchronous I/O to handle parallel requests and a polling engine that delivers sub-second updates for real-time quotes. It normalizes raw JSON responses into a consistent schema, pools HTTP sessions to reduce latency, caches recent responses to avoid redundant network calls, and maintains a local registry of stock symbols mapped to exchange-specific codes. This architecture allows runtime selection between providers and supports both on-demand and streaming data retrieval.