Skip to content

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_date
  • stock_code
  • stock_name
  • standard
  • first_industry_code
  • first_industry_name
  • second_industry_code
  • second_industry_name
  • third_industry_code
  • third_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 level is provided, only that level is matched
  • if level=None, the SDK tries all three hierarchy levels for the supplied name or industry_code
  • public results always use stock_code; internal order_book_id storage details are hidden