Producer (market-data-service):
- Backpressure: smart drop policy (heartbeats→quotes→trades preserved)
- Heartbeat monitor: synthetic HeartbeatEvent on provider silence
- Graceful shutdown: WS→bus→storage→DB engine cleanup sequence
- Bybit V5 public WS provider (backup for Binance, no API key needed)
- FailoverManager: health-based provider switching with recovery
- NATS output adapter: md.events.{type}.{symbol} for SenpAI
- /bus-stats endpoint for backpressure monitoring
- Dockerfile + docker-compose.node1.yml integration
- 36 tests (parsing + bus + failover), requirements.lock
Consumer (senpai-md-consumer):
- NATSConsumer: subscribe md.events.>, queue group senpai-md, backpressure
- State store: LatestState + RollingWindow (deque, 60s)
- Feature engine: 11 features (mid, spread, VWAP, return, vol, latency)
- Rule-based signals: long/short on return+volume+spread conditions
- Publisher: rate-limited features + signals + alerts to NATS
- HTTP API: /health, /metrics, /state/latest, /features/latest, /stats
- 10 Prometheus metrics
- Dockerfile + docker-compose.senpai.yml
- 41 tests (parsing + state + features + rate-limit), requirements.lock
CI: ruff + pytest + smoke import for both services
Tests: 77 total passed, lint clean
Co-authored-by: Cursor <cursoragent@cursor.com>
17 lines
391 B
Plaintext
17 lines
391 B
Plaintext
# Auto-generated pinned dependencies — 2026-02-09
|
|
# Install: pip install -r requirements.txt -c requirements.lock
|
|
annotated-types==0.7.0
|
|
nats-py==2.13.1
|
|
prometheus_client==0.24.1
|
|
pydantic==2.12.5
|
|
pydantic-settings==2.12.0
|
|
pydantic_core==2.41.5
|
|
python-dotenv==1.2.1
|
|
structlog==25.5.0
|
|
typing-inspection==0.4.2
|
|
typing_extensions==4.15.0
|
|
# Dev
|
|
pytest==9.0.2
|
|
pytest-asyncio==1.3.0
|
|
ruff==0.15.0
|