You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(finance): near-live quotes + market-session badge on watchlist & ticker
Watchlist cards and the ticker page now refresh their numbers without a
reload and show the trading session (pre-market / open / after-hours /
closed). No websockets — prod runs keyless Yahoo and WS streaming is a
PRD non-goal — so this is visibility-aware polling that pauses when the
tab is hidden or the market is closed.
- Quote gains marketState (PRE/REGULAR/POST/CLOSED). Yahoo getQuote
rewritten to use the intraday chart `meta` (live regularMarketPrice +
pre/post bars for the true last price) and derive the session from
meta.currentTradingPeriod; falls back to candle derivation on failure.
- New GET /api/finance/quotes batch endpoint feeds the watchlist; cards
show last price + session, and 1D now uses the live day-change.
- useVisibleInterval hook (ticker 15s, watchlist 20s) + shared
MarketSessionBadge. Quote cache TTL 300s -> 30s so polls surface
movement; the shared cache bounds upstream to ~1 fetch/symbol/window.
- Tests: yahoo.test.ts covers session classification + meta parsing.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments