Fix Massive API timestamp unit conversion (ns, not ms) - #3
Merged
Conversation
The market data backend requested in issue #2 (Massive API interface, unified market data interface, GBM simulator, full unit tests) was already built in a prior session per planning/MARKET_DATA_SUMMARY.md. Verified the implementation against planning/MARKET_INTERFACE.md, planning/MASSIVE_API.md, and planning/MARKET_SIMULATOR.md. Found one real bug: MassiveDataSource._poll_once() divided last_trade.timestamp by 1000, treating it as Unix milliseconds. The vendor-sourced planning/MASSIVE_API.md documents this field as nanoseconds. Fixed the conversion to /1_000_000_000, updated the corresponding mocks/assertions in test_massive.py, and corrected the same stale ms claim in planning/MARKET_DATA_DESIGN.md. Co-authored-by: thayes75 <12125300+thayes75@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.
Summary
backend/app/market/) against the planning docs requested in Build complete market data backend. #2MassiveDataSource._poll_once()dividedlast_trade.timestampby 1000 (ms) instead of 1,000,000,000 (ns), per the vendor-sourcedplanning/MASSIVE_API.mdtest_massive.pymocks/assertions and corrected the same stale claim inplanning/MARKET_DATA_DESIGN.mdTest plan
uv run --extra dev pytest -vinbackend/(could not be run in this session due to tool permission restrictions)Closes #2
Generated with Claude Code