Last modified:2026-07-19 17:02:27
Maintainer:Not configured
OperationId:etf_symbol_flows
Derived endpoint that computes per-ETF net flow estimates for one ETF over the requested lookback window by walking the ETF snapshot history and emitting ONE period per CHANGE of the SEC-derived (aum_usd, nav) pair. Formula per period: net_flow = Δ(shares_outstanding) × to_nav where shares_outstanding = aum_usd / nav, from_date is the last snapshot carrying the old pair and to_date is the first snapshot carrying the new pair. This is the standard ETF creation/redemption proxy used by analysts; results are an ESTIMATE, not ICI-authoritative numbers. Snapshot aum_usd/nav derive from SEC filings (NPORT-P monthly, 485BPOS annual) and are constant between filings, so flows are reported on FILING CADENCE, not per calendar day (the previous per-day contract read 0.0 on every non-filing day). Consecutive snapshots with unchanged (aum_usd, nav) are a single plateau and produce NO entry. When fewer than 2 distinct plateaus exist in the window the response is 200 with period_flows=[] and total_net_flow_dollar_estimate=null (honest 'no change observed', not an error). Days where the snapshot blob is missing are silently skipped; plateaus span across missing dates. Use case: UC-3 Sector Rotation Detector per-ETF accumulation signal, complemented by ICI aggregate at /etf/flows/aggregate. BREAKING (DATA-N4.7.1): this endpoint replaced the per-calendar-day series contract with filing-cadence period_flows, and renamed the days query param to lookback_days. The old days param is SILENTLY IGNORED (FastAPI drops undeclared query params; it is not rejected) - a mid-migration client sending ?days=30 gets 200 with the default lookback window.