跳转至

list_hk_universe API

Shadow Ingest / API Reference / Hong Kong
list_hk_universe(
    *,
    date,
) -> list[str]

Returns valid Hong Kong stock codes for one date.

This is the main helper to use when you want valid stock_codes for the HK public data APIs.

Parameters

Parameter Required Default Allowed values / shape Meaning
date yes YYYY-MM-DD, YYYYMMDD, datetime.date, or another date-like object Which Hong Kong trading date to evaluate

Parameter Notes

  • date is required; there is no implicit latest fallback
  • return values use HK identifiers such as 00700.XHKG
  • this API is separate from list_universe(date=...)
  • this API does not accept a market parameter

Copy-Paste Example

import shadow_ingest as si

hk_codes = si.list_hk_universe(date="2026-06-25")

print(hk_codes[:5])
print("00700.XHKG" in hk_codes)
print(len(hk_codes))

Example Output

[
  '00001.XHKG',
  '00002.XHKG',
  '00003.XHKG',
  '00004.XHKG',
  '00005.XHKG',
]
True
2761

Typical Follow-Up

import shadow_ingest as si

trade_date = "2026-06-25"
hk_codes = si.list_hk_universe(date=trade_date)
snapshot_df = si.gather_hk_daily_snapshot(
    trade_date=trade_date,
    stock_codes=hk_codes[:10],
)