From 88a8a88de4978d70e1560bc5529199a6c7fc0662 Mon Sep 17 00:00:00 2001 From: 0X-SquidSol Date: Thu, 9 Apr 2026 13:30:21 -0400 Subject: [PATCH] =?UTF-8?q?docs:=20fix=20README=20endpoint=20table=20?= =?UTF-8?q?=E2=80=94=20remove=20non-existent=20/v1/=20prefix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The README documented routes with a /v1/ prefix (e.g., /v1/markets, /v1/prices) but all actual routes are registered without any version prefix. Clients following the README would get 404s on every endpoint. Updates the endpoint table to match the actual route registration in src/index.ts, including all endpoints that were previously missing from the table (oracle, chart, ADL, ws/stats, funding/historySince, per-market trades/volume/prices). Co-Authored-By: Claude Opus 4.6 (1M context) --- README.md | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index f0f5a35..8e5723a 100644 --- a/README.md +++ b/README.md @@ -58,22 +58,33 @@ pnpm test ## API Endpoints -| Method | Endpoint | Description | -|--------|------------------------|--------------------------------| -| GET | `/health` | Health check | -| GET | `/docs` | OpenAPI documentation | -| GET | `/v1/markets` | List all markets | -| GET | `/v1/markets/:address` | Single market details | -| GET | `/v1/prices` | Current prices | -| GET | `/v1/prices/history` | Price history (OHLCV) | -| GET | `/v1/trades` | Trade history | -| GET | `/v1/funding` | Current funding rates | -| GET | `/v1/funding/history` | Funding rate history | -| GET | `/v1/open-interest` | Open interest data | -| GET | `/v1/insurance` | Insurance fund info | -| GET | `/v1/stats` | Platform statistics | -| GET | `/v1/crank` | Crank status | -| WS | `/ws` | WebSocket for live updates | +| Method | Endpoint | Description | +|--------|---------------------------------|--------------------------------| +| GET | `/health` | Health check | +| GET | `/docs` | OpenAPI documentation | +| GET | `/markets` | List all markets | +| GET | `/markets/:slab` | Single market details (on-chain) | +| GET | `/markets/stats` | All market stats | +| GET | `/markets/:slab/stats` | Single market stats | +| GET | `/markets/:slab/trades` | Trade history for a market | +| GET | `/markets/:slab/volume` | 24h volume for a market | +| GET | `/markets/:slab/prices` | Price history for a market | +| GET | `/prices/markets` | Current prices for all markets | +| GET | `/prices/:slab` | Oracle price history | +| GET | `/trades/recent` | Recent trades (global) | +| GET | `/funding/global` | Funding rates for all markets | +| GET | `/funding/:slab` | Funding rate for a market | +| GET | `/funding/:slab/history` | Funding rate history | +| GET | `/funding/:slab/historySince` | Funding history since timestamp | +| GET | `/open-interest/:slab` | Open interest data | +| GET | `/insurance/:slab` | Insurance fund info | +| GET | `/stats` | Platform statistics | +| GET | `/crank/status` | Crank status | +| GET | `/oracle/resolve/:mint` | Oracle price resolution | +| GET | `/chart/:mint` | OHLCV candle data | +| GET | `/api/adl/rankings` | ADL rankings | +| GET | `/ws/stats` | WebSocket metrics (auth required) | +| WS | `/` | WebSocket for live updates | ## Dependencies