Review/market data - #143
Open
aratabekov wants to merge 16 commits into
Open
Conversation
…11668379 Add Claude Code GitHub Workflow
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> # Conflicts: # .claude/settings.json
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Write MARKET_DATA_DESIGN.md: the implementation-ready blueprint for the market data subsystem, consolidating MARKET_INTERFACE.md, MARKET_SIMULATOR.md, and MASSIVE_API.md into one build guide with complete code. Covers the unified MarketDataSource interface, the GBM simulator (with synthetic history), the Massive REST source, the price cache, the background feed writer, source selection, FastAPI lifespan wiring, and the SSE + history consumer endpoints. Fills gaps left by the reference docs: a config module, historical bars on the interface, the SSE endpoint written out in full, cache warm-up, resilience table, tests, and dependencies. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CXG3RRjBPyYWeh2Sz4o6Qe
…gn-rabg1i Add market data backend implementation design document
…erface
Implements the full market data subsystem per planning/archive/MARKET_DATA_DESIGN.md:
- MarketDataSource ABC with SimulatedSource (correlated GBM engine, synthetic
history) and MassiveSource (Polygon.io/Massive REST client, snapshot +
aggregate bars) implementations
- In-memory PriceCache and MarketFeed background writer, decoupled from
SSE/portfolio consumer cadence
- FastAPI wiring (main.py) with GET /api/stream/prices, GET /api/history/{ticker},
GET /api/health, backed by a minimal lazy-init SQLite layer (watchlist/positions)
- Full pytest suite (simulator determinism/correlation/history, Massive response
parsing/error handling via mocked transport, feed/cache behavior, source
selection, DB reads, HTTP routes) - all deterministic, no network or API key
required
Archives the detailed design docs to planning/archive/ and adds
planning/MARKET_DATA_SUMMARY.md as the quick-reference for the portfolio/chat/
frontend agents building on top of this.
Closes #6
Co-authored-by: aratabekov <9768974+aratabekov@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pin Claude Code action to claude-opus-4-8 model
Build complete Market Data backend
Comprehensive review of the market data subsystem: all 32 backend tests pass. Documents two confirmed robustness bugs (feed loop dies on DB error; config crashes on empty numeric env vars), plus input-hardening and test-coverage recommendations. Also commits backend/uv.lock (generated during test setup) for reproducible dependency installs, per the plan's uv guidance. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.