Skip to content

Claude/market data backend design u0gv l#10

Open
oth100103 wants to merge 4 commits intoed-donner:mainfrom
oth100103:claude/market-data-backend-design-U0gvL
Open

Claude/market data backend design u0gv l#10
oth100103 wants to merge 4 commits intoed-donner:mainfrom
oth100103:claude/market-data-backend-design-U0gvL

Conversation

@oth100103
Copy link
Copy Markdown

No description provided.

oth100103 and others added 4 commits March 8, 2026 15:28
Comprehensive implementation-ready design document covering the unified
MarketDataSource interface, PriceCache, GBM simulator with Cholesky
correlated moves, Massive API client, SSE streaming endpoint, FastAPI
lifecycle integration, watchlist coordination, error handling, and
testing strategy — all with complete code snippets.

https://claude.ai/code/session_0194GYW6G8yEHpWBbbNJuDeB
gsarchioni added a commit to gsarchioni/finally that referenced this pull request Mar 29, 2026
Address issues from MARKET_DATA_REVIEW.md:
- PriceCache.version now acquires lock on read (thread safety)
- PriceCache.remove() bumps version (SSE detects ticker removal)
- GBMSimulator and SimulatorDataSource normalize ticker case
- Add PriceCache.tickers() method for querying tracked symbols
- Move router creation inside create_stream_router() factory
- Add event: price-update field to SSE events
- Type _fetch_snapshots return as list[TickerSnapshot]
- Fix stale CLAUDE.md references to nonexistent files

Adds 16 new tests (89 total, all passing):
- 6 tests for SSE stream generator (previously untested)
- 5 tests for PriceCache (version on remove, tickers method)
- 3 tests for GBMSimulator ticker normalization
- 2 tests for SimulatorDataSource ticker normalization

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
balalr92 referenced this pull request in balalr92/finally May 7, 2026
- frontend/lib/useSSE.ts: EventSource hook parsing batch {ticker: PriceUpdate} SSE
  events; maintains live price map and sparkline history (60 pts/ticker);
  exposes connected/reconnecting/disconnected status
- frontend/components/Header.tsx: brand, live total value/cash, color-coded
  connection dot
- frontend/components/Sparkline.tsx: plain SVG polyline from price history array
- frontend/components/WatchlistPanel.tsx: ticker rows with price flash animations
  (.flash-up/.flash-down), sparklines, ticker selection
- frontend/app/page.tsx: wired up useSSE, portfolio/watchlist fetches, Header and
  WatchlistPanel replacing placeholders
- frontend/lib/types.ts: corrected PriceUpdate (previous_price, change_percent)
  and WatchlistEntry to match actual API/SSE response shapes
- planning/PLAN.md: Task #7 marked DONE; Tasks #6, #8, #10 now unblocked

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants