gather_hk_daily_snapshot API¶
Shadow Ingest / API Reference / Hong Kong
gather_hk_daily_snapshot(
trade_date: str,
stock_codes: list[str],
) -> polars.DataFrame
Returns a Hong Kong daily cross-sectional snapshot for one trading date.
Parameters¶
| Parameter | Required | Default | Allowed values / shape | Meaning |
|---|---|---|---|---|
trade_date |
yes | — | YYYY-MM-DD |
Which Hong Kong trading date to query |
stock_codes |
yes | — | list of HK stock codes such as ['00700.XHKG'] |
Which HK stocks to include |
Discovery Workflow¶
import shadow_ingest as si
hk_dates = si.list_hk_market_calendar(year=2026)
hk_date = hk_dates[-1].isoformat()
hk_codes = si.list_hk_universe(date=hk_date)
snapshot_df = si.gather_hk_daily_snapshot(
trade_date=hk_date,
stock_codes=hk_codes[:2],
)
print(hk_date)
print(hk_codes[:5])
print(snapshot_df.columns)
Parameter Notes¶
trade_date¶
Use list_hk_market_calendar(...) when you want a valid HK trading date.
stock_codes¶
Use list_hk_universe(...) when you want valid HK identifiers for a trading date.
Snapshot columns¶
This API does not expose a stable public fields parameter.
If you want to see what columns are currently available in your environment:
import shadow_ingest as si
snapshot_df = si.gather_hk_daily_snapshot(
trade_date="2026-06-25",
stock_codes=["00700.XHKG"],
)
print(snapshot_df.columns)
Copy-Paste Example¶
import shadow_ingest as si
snapshot_df = si.gather_hk_daily_snapshot(
trade_date="2026-06-25",
stock_codes=["00700.XHKG"],
)
print(snapshot_df)
print(snapshot_df.schema)
Example Output¶
shape: (1, 12)
┌────────────┬────────────┬───────┬───────┬───┬────────────┬──────────┬────────────┬────────────┐
│ trade_date ┆ stock_code ┆ open ┆ high ┆ … ┆ prev_close ┆ limit_up ┆ limit_down ┆ num_trades │
│ --- ┆ --- ┆ --- ┆ --- ┆ ┆ --- ┆ --- ┆ --- ┆ --- │
│ date ┆ str ┆ f64 ┆ f64 ┆ ┆ f64 ┆ null ┆ null ┆ null │
╞════════════╪════════════╪═══════╪═══════╪═══╪════════════╪══════════╪════════════╪════════════╡
│ 2026-06-25 ┆ 00700.XHKG ┆ 428.6 ┆ 428.6 ┆ … ┆ 428.8 ┆ null ┆ null ┆ null │
└────────────┴────────────┴───────┴───────┴───┴────────────┴──────────┴────────────┴────────────┘
Pandas¶
snapshot_pdf = snapshot_df.to_pandas()