Implementation Plan: 010 Pricing Awareness and Market Data
- Transition from
007-observability-lgtm-compose to 008-pricing-awareness-market-data.
- Add functional pricing enhancements while preserving runtime/messaging foundations from
007.
- Keep runtime model on Docker Compose + NGINX ingress.
Technical Approachβ
- Add a new
price-publisher component:
- startup bootstrap from snapshot or yfinance,
- publish NATS
pricing.<TICKER> ticks on randomized interval (750-1500ms default) for random subset (25% default),
- expose REST lookup for current ticker price.
- Extend trade submission flow:
- stamp execution price in
trade-service,
- persist trade price in
trade-processor.
- Extend position aggregation flow:
- persist volume-weighted average cost basis at each trade update.
- Extend frontend:
- trade blotter price + relative execution time,
- position blotter open/market/value/P&L updates from price stream with directional/semantic highlighting,
- portfolio total value + total cost basis summary.
- Extend conformance/smoke:
- verify quote endpoint, pricing stream, persisted price/cost-basis fields.
Exit Criteriaβ
- Trade and position schemas include pricing fields with correct precision.
- Price stream is active and consumed by UI.
- End-to-end trade flow remains functional with pricing enrichment.
- State runtime scripts and docs are published for generated branch output.