AllTick
Chinese Stock Code Formats and Trading Rules
Chinese Stock MarketA-ShareHong Kong Stocks stock api Fintech Development

Chinese Stock Code Formats and Trading Rules

Learn Chinese stock code formats, A-share and Hong Kong stock trading rules, and practical market data integration tips for fintech developers building reliable stock market applications.

AllTick2 min read

For fintech developers building applications that support Chinese equities, stock codes are more than identifiers. A wrong exchange suffix can result in failed data requests, while incorrect trading-session or price-limit assumptions can produce misleading market displays.

This guide explains Chinese stock code formats, key trading rules, and practical ways to integrate A-share and Hong Kong stock market data into a fintech application.

Chinese Stock Code Formats by Exchange

Mainland China has three stock exchanges: the Shanghai Stock Exchange (SSE), Shenzhen Stock Exchange (SZSE), and Beijing Stock Exchange (BSE). Hong Kong stocks trade on the Hong Kong Stock Exchange (HKEX).

Market or security typeCommon code patternExchange
Shanghai main-board A-shares600, 601, 603, 605SSE
Shanghai STAR Market688, 689SSE
Shenzhen main-board A-shares000, 001, 002, 003SZSE
ChiNext stocks300, 301SZSE
Beijing Stock Exchange stocksIncludes 4- and 8-series codesBSE
Shanghai B-shares900 seriesSSE
Shenzhen B-shares200 seriesSZSE
Hong Kong-listed stocksCommonly five-digit numeric codesHKEX

These are common patterns, not a complete security directory. Code ranges and assignments depend on the security category and applicable exchange rules. Developers should validate instruments against an up-to-date security master rather than infer every attribute from the first digit.

Why API symbol formats matter

A stock code displayed by an exchange, broker, or financial website may differ from the symbol required by a market data API. Some providers append an exchange suffix; others use different identifiers or formatting conventions.

For example, Tencent Holdings is commonly identified by the Hong Kong stock code 00700. A data provider may represent it as 00700.HK, 700.HK, or another supported format.

Do not assume these representations are interchangeable. Check the provider's instrument directory before requesting quotes or subscribing to updates.

For applications supporting multiple markets, maintain a canonical instrument record with fields such as:

  • exchange: the listing exchange
  • local_symbol: the exchange's stock code
  • provider_symbol: the identifier accepted by the API
  • currency: the instrument's trading currency
  • security_type: A-share, B-share, or Hong Kong stock

This separation makes it easier to support different data providers without changing the identifiers used throughout your application.

Chinese Stock Trading Rules

Trading hours, price limits, and settlement arrangements differ by exchange and security category. The following table summarizes common rules for application design.

Trading hours

MarketRegular trading sessionsLocal time
Shanghai and Shenzhen A-shares9:30–11:30 and 13:00–15:00China Standard Time
Beijing Stock ExchangeGenerally follows the mainland A-share scheduleChina Standard Time
Hong Kong stocks9:30–12:00 and 13:00–16:00Hong Kong Time

These are regular continuous-trading sessions, not a complete description of every market phase. Mainland exchanges also have opening auctions, while Hong Kong has pre-opening and closing auction sessions. Holidays, half-day sessions, and special trading arrangements may affect the schedule.

Daily price limits

Security categoryGeneral daily limit
Mainland main-board A-sharesUsually ±10%
STAR Market stocksGenerally ±20%
ChiNext stocksGenerally ±20%
Beijing Stock Exchange stocksGenerally ±30%
B-sharesGenerally ±10%, subject to applicable rules
Hong Kong-listed stocksNo universal market-wide percentage limit

These limits are general reference values, not universal rules for every security or trading day. IPOs, risk-warning stocks, and other specified circumstances may have different arrangements. Hong Kong securities may also be subject to individual trading controls.

If your application calculates price limits or flags unusual price movements, use the rules applicable to the specific instrument and date. Avoid applying a single percentage to every stock.

Settlement and intraday trading

Settlement conventions should be kept separate from trading-session logic.

  • Mainland A-shares: Generally follow T+1 settlement conventions, with restrictions on selling shares purchased that day.
  • Hong Kong stocks: Exchange trades generally settle on T+2. Intraday buying and selling may be possible, subject to applicable rules and account arrangements.
  • B-shares: Check the settlement and payment requirements applicable to the relevant security and market.

T+1 and T+2 describe settlement cycles; they do not mean that a market opens one or two days later.

How to Integrate Chinese Stock Market Data

For fintech developers, reliable market integration requires more than retrieving the latest price. Symbol normalization, market schedules, and data validation should work together.

Normalize identifiers before making requests. Map the user's selected stock to the provider's supported symbol. Reject unknown mappings instead of silently guessing an exchange from the code.

Use exchange-specific calendars. Determine whether the instrument is in continuous trading, an auction session, or a holiday. A lack of updates outside a regular session does not automatically indicate a connection failure.

Validate incoming data. Check the instrument identifier, timestamp, price, and trading status before updating charts or downstream calculations. Keep raw provider messages available for troubleshooting and reconciliation.

Separate market data from trading rules. The data layer should identify and deliver quotes. A separate rules layer should handle price limits, trading eligibility, and market-session status. This reduces the risk of applying mainland rules to Hong Kong securities.

Accessing A-Share and Hong Kong Market Data with AllTick

Once the instrument mapping and market rules are defined, the next step is choosing a data source that supports the securities your application needs.

AllTick's Stock API provides market data for supported A-shares, Hong Kong stocks, and US stocks. Its REST API supports request-based access to market data, while its WebSocket API supports real-time quote streaming.

For a charting application, REST requests can retrieve data when needed, while WebSocket subscriptions can keep displayed quotes updated. Before implementation, verify each required instrument's provider symbol, available data types, authentication requirements, and subscription limits in the current documentation.

Start by checking the supported stock directory and testing a small set of representative instruments. Once symbol mapping and quote validation work correctly, expand coverage to additional exchanges and securities.

This approach helps fintech developers build a market data integration that is easier to maintain as the application adds more Chinese equities.

Start streaming market data today

Generate a free API key in seconds and connect to every market from one endpoint.