Skip to content

Fix Massive API timestamp unit conversion (ns, not ms) - #3

Merged
thayes75 merged 1 commit into
mainfrom
claude/issue-2-20260903-1657
Sep 3, 2026
Merged

Fix Massive API timestamp unit conversion (ns, not ms)#3
thayes75 merged 1 commit into
mainfrom
claude/issue-2-20260903-1657

Conversation

@thayes75

@thayes75 thayes75 commented Sep 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Verified the already-built market data backend (backend/app/market/) against the planning docs requested in Build complete market data backend. #2
  • Fixed a real bug: MassiveDataSource._poll_once() divided last_trade.timestamp by 1000 (ms) instead of 1,000,000,000 (ns), per the vendor-sourced planning/MASSIVE_API.md
  • Updated test_massive.py mocks/assertions and corrected the same stale claim in planning/MARKET_DATA_DESIGN.md

Test plan

  • Run uv run --extra dev pytest -v in backend/ (could not be run in this session due to tool permission restrictions)

Closes #2

Generated with Claude Code

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>
@thayes75
thayes75 merged commit 8a8ab02 into main Sep 3, 2026
1 check passed
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.

Build complete market data backend.

1 participant