refactor(V2): get_instruments common-only on /mcp (enriched with Deribit filters)
Move get_instruments off the per-exchange Deribit router and onto the
unified interface, without losing the advanced Deribit filtering.
- /mcp/tools/get_instruments now accepts the Deribit-specific filters
(currency, kind, expiry_from/to, strike_min/max, min_open_interest) and
pagination (offset/limit). Venues that list everything (Hyperliquid)
ignore them. Response adds `meta: {deribit: {total, offset, limit,
has_more}}` surfacing per-source pagination.
- Remove /mcp-deribit/tools/get_instruments (endpoint + tool wrapper +
GetInstrumentsReq schema). The DeribitClient.get_instruments METHOD
stays — it's what the unified normalizer calls.
Tests: cover the enriched filters + meta passthrough; app-boot asserts
/mcp-deribit/tools/get_instruments is gone. Docs (API_REFERENCE/README/
CLAUDE) and smoke updated; also fixed the stale Hyperliquid tool count
(14 → 15) found during the doc check.
325 passed, ruff clean. Verified live: kind=option limit=5 → 5/940
has_more=true; /mcp-deribit/tools/get_instruments → 404.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -61,11 +61,13 @@ Nota: nel modulo `sentiment` "bybit" resta come **fonte dati pubblica**
|
||||
|
||||
- **`/mcp` (comune)** — gli **unici** tool dati trasversali. `get_instruments`
|
||||
(schema uniforme: `exchange`, `fees`, `history_start`, `type`, `tick_size`,
|
||||
`native`); `get_historical` e `get_indicators` con `exchange` opzionale →
|
||||
singolo venue se valorizzato, **consenso** multi-exchange (mediana OHLC +
|
||||
`div_pct`) se omesso. Supporta deribit + hyperliquid (IBKR non integrato).
|
||||
`native`; filtri/paginazione Deribit + `meta` per-sorgente); `get_historical`
|
||||
e `get_indicators` con `exchange` opzionale → singolo venue se valorizzato,
|
||||
**consenso** multi-exchange (mediana OHLC + `div_pct`) se omesso. Supporta
|
||||
deribit + hyperliquid (IBKR non integrato).
|
||||
- **`/mcp-{exchange}`** — router per-exchange per il resto (ticker, ordini,
|
||||
options analytics, …). **NON** espongono più `get_historical`/`get_indicators`.
|
||||
options analytics, …). **NON** espongono più
|
||||
`get_instruments`/`get_historical`/`get_indicators`.
|
||||
|
||||
Convenzione: `get_historical` ritorna la chiave uniforme
|
||||
`candles: [{timestamp(ms), open, high, low, close, volume}]` (validatore in
|
||||
|
||||
Reference in New Issue
Block a user