docs: update NODE1 docs for MD pipeline deploy (ports 8893/8892)
- Fix market-data-service host port 8891→8893 (conflict with Swapper) - Increase healthcheck start_period/retries for market-data-service - Add Market Data Service + SenpAI MD Consumer to PROJECT-MASTER-INDEX.md - Update noda1-operations rule and skill with new ports/containers Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -137,6 +137,8 @@ python3 tools/agents smoke --id <agent_id> # Smoke test
|
||||
| **NATS** | 4222 | - |
|
||||
| **Grafana** | 3030 | `/api/health` |
|
||||
| **Prometheus** | 9090 | `/-/healthy` |
|
||||
| **Market Data Service** | 8893 | `/health` |
|
||||
| **SenpAI MD Consumer** | 8892 | `/health` |
|
||||
|
||||
---
|
||||
|
||||
@@ -282,5 +284,61 @@ TELEGRAM → GATEWAY:9300 → ROUTER:8000 → LLM (Ollama/DeepSeek)
|
||||
|
||||
---
|
||||
|
||||
## 📈 Market Data Pipeline (SenpAI)
|
||||
|
||||
**Дата впровадження:** 2026-02-09
|
||||
|
||||
### Архітектура
|
||||
|
||||
```
|
||||
Binance WS ─┐ ┌─ senpai.features.{symbol}
|
||||
Bybit WS ───┤→ market-data-service ──NATS──→ senpai-md-consumer ──NATS──→ senpai.signals.{symbol}
|
||||
│ (порт 8893) md.events.> (порт 8892) └─ senpai.alerts
|
||||
└─ SQLite + JSONL
|
||||
```
|
||||
|
||||
### Компоненти
|
||||
|
||||
| Сервіс | Контейнер | Порт | Призначення |
|
||||
|--------|-----------|------|-------------|
|
||||
| **market-data-service** | `dagi-market-data-node1` | 8893 | WS producer: Binance+Bybit → NATS `md.events.>` |
|
||||
| **senpai-md-consumer** | `dagi-senpai-md-consumer-node1` | 8892 | NATS consumer: features, signals, alerts |
|
||||
|
||||
### Ключові endpoints
|
||||
|
||||
```bash
|
||||
# Producer
|
||||
curl http://localhost:8893/health
|
||||
curl http://localhost:8893/metrics
|
||||
curl http://localhost:8893/bus-stats
|
||||
curl "http://localhost:8893/latest?symbol=BTCUSDT"
|
||||
|
||||
# Consumer
|
||||
curl http://localhost:8892/health
|
||||
curl http://localhost:8892/stats
|
||||
curl "http://localhost:8892/features/latest?symbol=BTCUSDT"
|
||||
curl http://localhost:8892/metrics
|
||||
```
|
||||
|
||||
### NATS subjects
|
||||
|
||||
| Subject | Publisher | Payload |
|
||||
|---------|-----------|---------|
|
||||
| `md.events.trade.{symbol}` | market-data-service | TradeEvent |
|
||||
| `md.events.quote.{symbol}` | market-data-service | QuoteEvent |
|
||||
| `senpai.features.{symbol}` | senpai-md-consumer | FeatureSnapshot (11 features) |
|
||||
| `senpai.signals.{symbol}` | senpai-md-consumer | TradeSignal (long/short) |
|
||||
| `senpai.alerts` | senpai-md-consumer | AlertEvent (gaps/latency) |
|
||||
|
||||
### Файли
|
||||
|
||||
| Шлях | Опис |
|
||||
|------|------|
|
||||
| `services/market-data-service/` | Код producer-сервісу |
|
||||
| `services/senpai-md-consumer/` | Код consumer-сервісу |
|
||||
| Docker volume `market-data-node1` | SQLite DB + JSONL events log |
|
||||
|
||||
---
|
||||
|
||||
**Автор:** Cursor Agent
|
||||
**Останнє оновлення:** 2026-01-29
|
||||
**Останнє оновлення:** 2026-02-09
|
||||
|
||||
Reference in New Issue
Block a user