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 universe | Up / Flat / Down | Share up |
|---|---|---|
| 30 effective constituents | 10 / 1 / 19 | 33.3% |
| 20 announced additions | 16 / 0 / 4 | 80% |
| Future roster applied early | 26 / 1 / 23 | 52% |

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.
- Use the TickDB Hong Kong Stocks API after the close for a batch snapshot. Call
GET /v1/market/tickerwith comma-separated full symbols, up to 50 per request. Request equities withtype=stock; query the benchmark separately withsymbols=HSTECH&type=indices. Set the documentedX-API-Keyheader. [4] - Check the business response code, returned symbols and quote dates before counting. Compare
last_pricewithprev_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. - 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 data | Why it matters |
|---|---|
| Roster version, effective date, source | Identifies which stocks count that day |
| Symbol, prior close, snapshot, source time | Makes direction and timing verifiable |
| Advances, flat, declines, missing, valid count | Reveals which stocks were included in breadth |
| Index level and source time | Records 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
- Hang Seng Indexes, quarterly index review announcement, November 20, 2026, pp. 1–2 and Appendix 3.
- 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.
- Hang Seng Indexes, Index Methodology General Guide and Hang Seng TECH Index methodology.
- 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