get_industry_members API¶
Shadow Ingest / API Reference / Industry
get_industry_members(
name: str | None = None,
*,
standard: str,
trade_date,
level: int | None = None,
industry_code: str | None = None,
) -> polars.DataFrame
Returns member stock rows for one industry under one standard and one trade date.
Provide exactly one of name or industry_code.
Before You Run This Example¶
Parameters¶
| Parameter | Required | Default | Allowed values / shape | Meaning |
|---|---|---|---|---|
name |
conditional | None |
industry name string | Industry name to match |
industry_code |
conditional | None |
industry code string | Industry code to match |
standard |
no | "sws" |
taxonomy name such as sws, citics, citics_2019, gildata |
Which industry standard to use |
trade_date |
yes | — | YYYY-MM-DD, YYYYMMDD, datetime.date, or another date-like object |
Which date to evaluate |
level |
no | None |
1, 2, 3, or None |
Restrict matching to one hierarchy level; None tries all levels |
Returned Columns¶
Stable result columns:
trade_datestock_codestock_namestandardfirst_industry_codefirst_industry_namesecond_industry_codesecond_industry_namethird_industry_codethird_industry_name
Copy-Paste Example¶
import shadow_ingest as si
members_df = si.get_industry_members(
"银行",
trade_date="2024-01-03",
level=1,
)
print(members_df.head())
Matching Rule¶
- if
levelis provided, only that level is matched - if
level=None, the SDK tries all three hierarchy levels for the suppliednameorindustry_code - public results always use
stock_code; internalorder_book_idstorage details are hidden