# REST API (read-only)

> GET /api/v1/{endpoint} with your Deskr token returns the same market reads as the MCP server as plain JSON. Read-only, plan-gated, rate-limited.

```http
GET https://deskr.trade/api/v1/{endpoint}?{params}
Authorization: Bearer dskr_…
```

The REST API gives you the 11 read-only [MCP tools](/api/mcp-tools) as plain HTTP GET requests, for scripts, spreadsheets and dashboards that don't speak MCP. It is read-only: nothing here places an order, and the `chart_*` tools are not part of it.

## Token

Use the same token as MCP. Create one in **Settings → MCP** (shown once; Deskr stores only a hash) and send it in the `Authorization` header. Tokens in the URL are refused, so they can't end up in logs or browser history. Revoking the token in Settings stops it in both places.

## Endpoints

`GET https://deskr.trade/api/v1` lists every endpoint with its parameters, no token needed.

| Endpoint | Parameters | What it returns |
|---|---|---|
| `/api/v1/coins` | `q` (ticker prefix) | Every tracked coin with price, 24h change and whether your plan can read it |
| `/api/v1/snapshot` | `sym` (required) | One coin now: price, changes, volume, trend by timeframe, EMAs, volatility |
| `/api/v1/zones` | `sym` (required) | 50% and 80% zones for the next 24h, nearest support and resistance, hold rates |
| `/api/v1/signals` | `sym`, `limit` (max 50) | Recent feed signals with the rule text that fired them |
| `/api/v1/volume_profile` | `sym` (required) | 7-day volume profile: POC, value area, 24 bins |
| `/api/v1/book` | `sym` (required) | Top 20 order book levels per side |
| `/api/v1/oi_funding` | `sym` (required) | Open interest, funding, taker flow and per-venue rows |
| `/api/v1/house_books` | none | House paper books next to their random controls |
| `/api/v1/lab` | none | Strategy lab presets and their validation verdicts |
| `/api/v1/macro` | none | S&P 500, Nasdaq-100, gold, oil, EUR/USD and crypto dominance |
| `/api/v1/ideas` | `sym` | Open ideas (Pro and Team) and the backtest against a random control |

Unknown parameters are an error, so a typo doesn't silently return the wrong thing.

## Plans and limits

| | Free | Pro and Team |
|---|---|---|
| Coins | BTC and ETH | Every enabled coin |
| Calls per token | 30 a minute | 120 a minute |

The budget is shared between MCP and REST for the same token. Responses carry `x-ratelimit-limit` and `x-ratelimit-remaining`; over the limit you get `429` with `retry-after`.

## Responses

```json
{ "ok": true, "tool": "snapshot", "plan": "pro", "data": { "sym": "BTC", "t": 1795800000, "src": "deskr-engine", "…": "…" } }
```

Errors come back as `{ "ok": false, "error": "…" }`: `401` without a valid token, `400` for a bad or missing parameter or a coin your plan can't read, `404` for an unknown endpoint, `405` for anything but GET, `429` over the limit.

## Example

```bash
curl -s "https://deskr.trade/api/v1/zones?sym=BTC" -H "Authorization: Bearer $DESKR_TOKEN"
```

Every number is analytics, not advice. Please link to deskr.trade when you publish the data. A WebSocket stream is not available yet.
