Hong Kong Stock API Guide: Count Advancing Stocks Using the Constituents in Effect That Day

TickDB Research ·

Hong Kong Stock API Guide: Count Advancing Stocks Using the Constituents in Effect That Day

A benchmark can fall while most of the names on a watchlist rise. To find out what happened inside the index, match batch quotes to the constituent roster effective on the review date. On one Hang Seng TECH session, changing the roster alone moved the share of advancing stocks from 33.3% to 52%.

At the end of November 23, the Hang Seng TECH Index snapshot showed a 0.09% decline. If your watchlist shows more gainers than losers, check which stocks it counted before describing the index. Ten of the 30 constituents in effect that day rose. Add the 20 stocks announced for future inclusion and the same quotes yield 26 advances out of 50. One calculation describes the index's membership on November 23. The other asks how a future roster performed on that date. [1, 2]

Index return and market breadth answer different questions

The index tracks the price movement of a basket whose members have different weights. Hang Seng TECH uses free-float-adjusted market-cap weighting. Breadth counts how many stocks advanced against their own prior closes, with one vote per stock. Keep both measures if you want to distinguish the benchmark's move from how widely it was shared across the basket. You can calculate breadth for your watchlist in a separate column and compare it with the benchmark's constituents. [3]

A difference between index direction and breadth is possible even with correct data. Before examining weights or your portfolio exposure, verify that the breadth count used the roster effective that day.

Keep the trading date fixed and change only the roster

Hang Seng Indexes announced an increase from 30 to 50 constituents on November 20. The change was scheduled for implementation after the December 4 close and effective from December 7. We transcribed both groups from the announcement and pulled a batch snapshot for all 50 stocks. Every stock quote carried a November 23 source time of 16:08:22 Hong Kong time. We classified each stock by comparing its snapshot price with its own previous close. [1, 2]

November 23 universeUp / Flat / DownShare up
30 effective constituents10 / 1 / 1933.3%
20 announced additions16 / 0 / 480%
Future roster applied early26 / 1 / 2352%

The share of advancers moves from 33.3% to 52% when the future roster is applied early

Figure 1. Both rows use the same day's stock snapshots. The benchmark snapshot read 3,508, down about 0.09%, with a source time of 16:08:44. [2]

The 16 advances among the additions pushed the expanded roster above half. AAC Technologies rose about 3.73% in the sample, for example. It belonged on a preview list until December 7. The same index snapshot of 3,508 applies to both comparisons. What changes is the way our report groups and counts the stocks. Prices and membership each have their own dates. Joining on the relevant trading date preserves the question you set out to answer. [1, 2]

Build a market review you can reproduce

Keep one sheet for symbols, roster source, effective date and the next version's effective date. Keep a second sheet for trading day, symbol, snapshot price, prior close and quote source time. Select the roster in effect on the date you want to review and join it to that day's quotes by symbol.

  1. Use the TickDB Hong Kong Stocks API after the close for a batch snapshot. Call GET /v1/market/ticker with comma-separated full symbols, up to 50 per request. Request equities with type=stock; query the benchmark separately with symbols=HSTECH&type=indices. Set the documented X-API-Key header. [4]
  2. Check the business response code, returned symbols and quote dates before counting. Compare last_price with prev_close. Flag missing prices, invalid references and mismatched quote dates. Display valid rows alongside the expected number of stocks so readers can see the denominator.
  3. For a historical review, request daily candles through GET /v1/market/kline. Specify the symbol, interval=1d, a consistent price-adjustment setting and the needed dates. Check the reference and adjustment setting around ex-dividend events. We also checked the prior closes of three sample stocks against November 20 daily bars. Retain the dated constituent roster from the index provider's announcement or archive. [1, 2, 4]
Keep this dataWhy it matters
Roster version, effective date, sourceIdentifies which stocks count that day
Symbol, prior close, snapshot, source timeMakes direction and timing verifiable
Advances, flat, declines, missing, valid countReveals which stocks were included in breadth
Index level and source timeRecords the benchmark for the session

When the next announcement comes out, start a separate preview group and continue using the effective roster for daily reviews. Switch the official group on the announced effective date. Later you can review the original session and the future basket side by side.

FAQ

Can I use today's roster to look at last year's prices? Yes, for a fixed-basket comparison. Label the roster date. To describe the historical index membership, retrieve the roster in effect during the historical review.

What if the index and most members move in different directions? Verify the roster, dates and quote coverage. To estimate contributions to the index, obtain contemporaneous weights and apply the methodology.

References

  1. Hang Seng Indexes, quarterly index review announcement, November 20, 2026, pp. 1–2 and Appendix 3.
  2. TickDB, November 23, 2026 batch Hong Kong stock snapshots and HSTECH snapshot, with November 20 daily checks for 2018.HK, 3750.HK and 992.HK.
  3. Hang Seng Indexes, Index Methodology General Guide and Hang Seng TECH Index methodology.
  4. TickDB Docs, Market Ticker and Historical K-Line.

7 markets · 42,688 symbols

US stocks
14,386
Hong Kong market
3,354
China stocks, ETFs & bonds
7,576
Forex & metals
1,228
Indices
13,960
Futures
1,172
Crypto
1,012
11/24/2026

Related articles

Did Your Watchlist Follow the Index? A Midday Review with a Real-Time China A-Share Stock API

On November 23, the ChiNext Index opened lower and was up 1.22% by midday. Yet 209 stocks in our example watchlist were still below their previous close. Use opening prices, previous closes, and midday quotes from a real-time China A-share stock API to see which stocks rebounded, which turned positive, and whether your watchlist still warrants a risk flag.

TickDB Research ·

Moving a Hong Kong stock data API into Docker? Check the first quote after restart

Before moving a Hong Kong stock dashboard, alerting service, or risk monitor to Docker, what should count as recovery? In our local Tencent test, the first quote request returned HTTP 403. A later run returned a valid snapshot. The controlled restart command returned after 0.223 seconds, and the first quote passed validation after 1.580 seconds. It was still the previous session's quote. This article shows what to check on a weekend and what to verify again during trading.

TickDB Research ·