Skip to content

Shadow Ingest API Reference

shadow-ingest exposes nine stable public Python APIs.

The SDK is intentionally split into:

  • three task-oriented APIs for fetching core market and financial tables
  • three general-purpose APIs for discovering valid inputs
  • three industry APIs for taxonomy lookup and industry membership queries

Before You Run The Examples

Use the setup here first:

Task-Oriented APIs

API Use it for Return type
gather_daily_price(...) daily price history over trade_date x stock_code polars.DataFrame
gather_daily_snapshot(...) one-date cross-sectional market snapshot polars.DataFrame
gather_financial_snapshot(...) latest financial snapshot by statement type polars.DataFrame

General-Purpose APIs

API Use it for Return type
list_fields(...) discovering supported fields values for gather_daily_price(...) list[str]
list_market_calendar(...) discovering valid trading dates list[datetime.date]
list_universe(...) discovering valid stock codes for a specific date list[str]

Industry APIs

API Use it for Return type
get_industry_standards() listing the available industry classification standards list[str]
get_industry_mapping(...) mapping stock codes to industry rows for one standard and date polars.DataFrame
get_industry_members(...) mapping an industry code or name to member stock rows polars.DataFrame

If you are not sure what to query yet, use the APIs in this order:

  1. list_market_calendar(...)
  2. list_universe(...)
  3. list_fields(...) when you are querying daily prices
  4. get_industry_standards() if you need a taxonomy such as sws or citics
  5. one of the dataframe-returning APIs

Which API Should I Use?

Pandas Users

The SDK is dataframe-first with polars.DataFrame as the default return type for the table APIs.

If you prefer pandas:

pdf = df.to_pandas()