docs(V2): document /mcp-cross historical aggregator
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,10 @@ sul token bearer fornito dal client.
|
||||
override-abili tramite variabili dedicate (`DERIBIT_URL_*`,
|
||||
`BYBIT_URL_*`, `HYPERLIQUID_URL_*`, `ALPACA_URL_*`)
|
||||
- **Documentazione interattiva** OpenAPI/Swagger esposta a `/apidocs`
|
||||
- **Qualità verificata**: 366 test (unit + integration + smoke), mypy
|
||||
- **Endpoint cross-exchange unificato** (`/mcp-cross/tools/get_historical`):
|
||||
fan-out a tutti gli exchange che supportano (symbol, asset_class) e
|
||||
consensus per-bar (mediana OHLC + `div_pct` + `sources`)
|
||||
- **Qualità verificata**: 399 test (unit + integration + smoke), mypy
|
||||
pulito, ruff pulito
|
||||
|
||||
## Avvio rapido (sviluppo, senza Docker)
|
||||
@@ -91,6 +94,7 @@ non è richiesto sugli endpoint pubblici (`/health`, `/apidocs`,
|
||||
| `POST /mcp-ibkr/tools/{tool}` | Tool exchange Interactive Brokers |
|
||||
| `POST /mcp-macro/tools/{tool}` | Tool macro/market data |
|
||||
| `POST /mcp-sentiment/tools/{tool}` | Tool sentiment/news |
|
||||
| `POST /mcp-cross/tools/get_historical` | Storico aggregato cross-exchange con consensus + divergenza |
|
||||
| `GET /admin/audit` | Query dell'audit log JSONL (bearer richiesto, no X-Bot-Tag) |
|
||||
|
||||
## Observability
|
||||
@@ -204,6 +208,16 @@ News (CryptoPanic/CoinDesk), social (LunarCrush), funding multi-exchange,
|
||||
OI history, get_funding_arb_spread, get_liquidation_heatmap,
|
||||
get_cointegration_pairs.
|
||||
|
||||
### Cross (storico unificato)
|
||||
`get_historical` aggrega le candele dello stesso simbolo da tutti gli
|
||||
exchange che lo supportano e ritorna una serie consensus: la chiusura è
|
||||
la mediana, `sources` è il numero di exchange che hanno contribuito al
|
||||
bar e `div_pct = (max-min)/median` segnala il disaccordo tra fonti — un
|
||||
quality gate per i bot. Crypto: BTC/ETH/SOL via Bybit + Hyperliquid +
|
||||
Deribit. Stocks: AAPL/SPY/QQQ/TSLA/NVDA via Alpaca. In caso di fallimento
|
||||
parziale ritorna i dati disponibili più `failed_sources`; se *tutti* gli
|
||||
upstream falliscono → HTTP 502 retryable.
|
||||
|
||||
## Deploy su VPS con Traefik
|
||||
|
||||
Sul VPS la rete pubblica (TLS, allowlist IP, rate limit) è gestita da
|
||||
@@ -288,7 +302,7 @@ PORT=9000 TESTNET_TOKEN="$TESTNET_TOKEN" bash tests/smoke/run.sh
|
||||
|
||||
```bash
|
||||
uv sync
|
||||
uv run pytest # tutta la suite (366 test attesi)
|
||||
uv run pytest # tutta la suite (399 test attesi)
|
||||
uv run pytest tests/unit -v # solo unit
|
||||
uv run pytest tests/integration -v
|
||||
uv run ruff check src/ tests/
|
||||
|
||||
Reference in New Issue
Block a user