@@ -3457,3 +3457,181 @@ class FlowStockOutliersResponse(TypedDict, total=False):
34573457 limit : int
34583458 # Imbalance-ranked flagged symbols.
34593459 outliers : List [FlowOutlierRow ]
3460+
3461+
3462+ # ── Flow signals (unusual-flow feed, Alpha+) ─────────────────────────
3463+ #
3464+ # Per-underlying scored/classified unusual-flow signals. Snake_case wire
3465+ # shape (analytics family). Both endpoints reuse ``FlowSignal``.
3466+
3467+
3468+ class FlowSignalsChain (TypedDict , total = False ):
3469+ """Settled-chain reference levels echoed alongside the signals.
3470+
3471+ Computed once per request from the settled snapshot — independent of
3472+ the live flow surface. All fields are ``None`` when the chain
3473+ snapshot is unavailable.
3474+ """
3475+
3476+ call_wall : Optional [float ]
3477+ put_wall : Optional [float ]
3478+ max_pain : Optional [float ]
3479+ gamma_flip : Optional [float ]
3480+
3481+
3482+ class FlowSignalScoreBreakdown (TypedDict , total = False ):
3483+ """Component contributions that sum to the headline ``score``.
3484+
3485+ Weights are server-tunable so absolute values may shift, but the
3486+ ordering of components is stable.
3487+ """
3488+
3489+ premium : int
3490+ size_vs_oi : int
3491+ aggressor : int
3492+ sweep : int
3493+ opening_bias : int
3494+ tenor : int
3495+
3496+
3497+ class FlowSignalEnrichment (TypedDict , total = False ):
3498+ """Chain-derived context attached to a signal.
3499+
3500+ All numeric fields are ``None`` and ``moneyness`` is ``"unknown"``
3501+ when the contract isn't in the settled chain snapshot.
3502+ """
3503+
3504+ iv : Optional [float ]
3505+ delta : Optional [float ]
3506+ gamma : Optional [float ]
3507+ # IV minus the nearest ATM IV (signed).
3508+ iv_vs_atm : Optional [float ]
3509+ # ``"OTM"`` / ``"ATM"`` / ``"ITM"`` / ``"unknown"``.
3510+ moneyness : str
3511+ # Estimated dollar delta-notional of this print.
3512+ estimated_delta_notional : Optional [float ]
3513+ # Standalone gamma-$ this print would add if it were opening and
3514+ # fully dealer-absorbed. **Not** applied to the live chain — don't
3515+ # sum it against ``/v1/flow/gex``.
3516+ hypothetical_gex_impact_if_opening : Optional [float ]
3517+
3518+
3519+ class FlowSignal (TypedDict , total = False ):
3520+ """One scored unusual-flow signal.
3521+
3522+ A signal is a coalesced view of one notable (block-sized) print on a
3523+ single contract: classification, scoring, and chain-context
3524+ enrichment. Same shape across ``/v1/flow/signals/{symbol}`` and
3525+ ``/v1/flow/signals/{symbol}/summary``'s ``top_signals``.
3526+ """
3527+
3528+ # Trade timestamp (ISO-8601 UTC).
3529+ ts : str
3530+ # Contract expiry (``YYYY-MM-DD``).
3531+ expiry : str
3532+ # Contract strike price.
3533+ strike : float
3534+ # ``"C"`` (call) or ``"P"`` (put).
3535+ right : str
3536+ # Upstream buy/sell/mid aggressor classification (distinct from the
3537+ # NBBO ``aggressor`` label).
3538+ side : str
3539+ # Trade price.
3540+ price : float
3541+ # Trade size in contracts.
3542+ size : int
3543+ # Dollar premium of this print: ``price * size * 100``.
3544+ premium : float
3545+ # Days to expiry at trade time.
3546+ dte : int
3547+ # ``"block"`` (lone block-sized print) or ``"sweep"`` (≥2 same-side
3548+ # prints on one contract within ~500ms).
3549+ structure : str
3550+ # NBBO position at trade: ``"above_ask"`` / ``"at_ask"`` / ``"mid"`` /
3551+ # ``"at_bid"`` / ``"below_bid"``.
3552+ aggressor : str
3553+ # Contract-level OI-simulator inference: ``"opening_bias"`` /
3554+ # ``"closing_bias"`` / ``"unknown"``. Not a per-print label.
3555+ open_close_bias : str
3556+ # Simulator confidence weight for the bias above.
3557+ open_close_confidence : float
3558+ # Signed simulator estimate of contracts opened (+) or closed (−)
3559+ # today on this contract.
3560+ contract_net_oi_delta : int
3561+ # ``"bullish"`` / ``"bearish"`` / ``"neutral"``. Neutral whenever
3562+ # ``open_close_bias == "closing_bias"`` (can't attribute on unwinds)
3563+ # or ``side == "mid"``.
3564+ intent : str
3565+ # 0–100 composite (components sum to this).
3566+ score : int
3567+ # ``"low"`` / ``"medium"`` / ``"high"``.
3568+ conviction : str
3569+ # Subset of ``"sweep"``, ``"block"``, ``"opening"``, ``"closing"``,
3570+ # ``"0dte"``, ``"whale"`` (premium ≥ $1M), ``"golden"`` (top decile
3571+ # in this response set *and* score ≥ 70 absolute).
3572+ tags : List [str ]
3573+ score_breakdown : FlowSignalScoreBreakdown
3574+ enrichment : FlowSignalEnrichment
3575+
3576+
3577+ class FlowSignalsResponse (TypedDict , total = False ):
3578+ """Scored, classified unusual-flow feed from
3579+ ``GET /v1/flow/signals/{symbol}``.
3580+
3581+ Each notable print in the look-back window is coalesced into a
3582+ signal, scored 0–100, and ranked highest score first. Requires the
3583+ Alpha plan.
3584+ """
3585+
3586+ # Underlying ticker echoed from the request path.
3587+ symbol : str
3588+ # Timestamp this snapshot was computed for (ISO-8601 UTC).
3589+ as_of : str
3590+ # Look-back window applied (minutes).
3591+ window_minutes : int
3592+ # Expiration filter echoed back, or ``None``.
3593+ expiry : Optional [str ]
3594+ # Spot mid at the snapshot time.
3595+ underlying_price : Optional [float ]
3596+ # Settled-chain reference levels (computed once per request).
3597+ chain : FlowSignalsChain
3598+ # Number of signals returned (after server-side filtering).
3599+ count : int
3600+ # Signals, highest score first.
3601+ signals : List [FlowSignal ]
3602+
3603+
3604+ class FlowSignalsSummaryResponse (TypedDict , total = False ):
3605+ """Net-directional roll-up from
3606+ ``GET /v1/flow/signals/{symbol}/summary``.
3607+
3608+ Sums classified premium across the window into bullish/bearish and
3609+ opening/closing buckets — a cheap "smart-money tilt" read for one
3610+ underlying. Requires the Alpha plan.
3611+ """
3612+
3613+ # Underlying ticker echoed from the request path.
3614+ symbol : str
3615+ # Timestamp this snapshot was computed for (ISO-8601 UTC).
3616+ as_of : str
3617+ # Look-back window applied (minutes).
3618+ window_minutes : int
3619+ # Expiration filter echoed back, or ``None``.
3620+ expiry : Optional [str ]
3621+ # Spot mid at the snapshot time.
3622+ underlying_price : Optional [float ]
3623+ # Total signal count in the window (full count, not the
3624+ # ``top_signals`` length).
3625+ signal_count : int
3626+ # Sum of signal premium with ``intent == "bullish"``.
3627+ bullish_premium : float
3628+ # Sum of signal premium with ``intent == "bearish"``.
3629+ bearish_premium : float
3630+ # ``bullish_premium - bearish_premium``.
3631+ net_directional_premium : float
3632+ # Sum of signal premium with ``open_close_bias == "opening_bias"``.
3633+ opening_premium : float
3634+ # Sum of signal premium with ``open_close_bias == "closing_bias"``.
3635+ closing_premium : float
3636+ # Highest-scoring signals (≤ 10). Same shape as ``FlowSignal``.
3637+ top_signals : List [FlowSignal ]
0 commit comments