Merged
Conversation
Implements the market data layer from scratch per planning/MARKET_INTERFACE.md,
planning/MARKET_SIMULATOR.md, and planning/MASSIVE_API.md:
- market/types.py — PricePoint dataclass
- market/cache.py — thread-safe PriceCache with update/get/remove/clear
- market/base.py — MarketDataProvider abstract base class
- market/simulator.py — GBM SimulatorProvider: correlated moves, random events,
500ms tick loop, any ticker string accepted
- market/massive.py — MassiveProvider: REST polling every 15s, validate_ticker
- market/factory.py — create_provider() selects provider via MASSIVE_API_KEY env var
- tests/ — full unit test suite covering cache, simulator, Massive
client (via respx mocks), and factory selection
Also creates db/.gitkeep for the SQLite volume mount directory.
Co-authored-by: Ashish <kplayz@users.noreply.github.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.
Implements the complete market data backend layer per planning docs:
market/types.py— PricePoint dataclassmarket/cache.py— thread-safe PriceCachemarket/base.py— MarketDataProvider ABCmarket/simulator.py— GBM SimulatorProvider (500ms ticks, correlation, random events)market/massive.py— MassiveProvider (REST polling every 15s)market/factory.py— env-driven provider selectionCloses #4
Generated with Claude Code