> For the complete documentation index, see [llms.txt](https://resolvedmarkets.com/llms.txt). Every docs page is also served as Markdown: append `.md` to its URL or send `Accept: text/markdown`.

# Get Orderbook By Slug

### GET /v1/markets/by-slug/:slug/orderbook — Get Orderbook By Slug

Returns the live orderbook for a market matched by slug. Supports exact slugs, partial slugs (e.g. btc-updown-5m), and slugs with different timestamps. Only works for active markets.

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `slug` | string | yes | Market slug (e.g. sol-updown-5m or sol-updown-5m-1772799300) |

**Query parameters**

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `format` | string | no | json | Response encoding. csv and tsv return the rows as a flat file instead of a JSON envelope — the envelope moves to X-* response headers and nulls render as \N. REQUIRES SCALE OR ENTERPRISE (json is available on every tier). Works with includebook=true — the bids/asks ladders come through as compact JSON inside their cell, complete and parseable (pandas: df["bids"].apply(json.loads)). |

**Example response**

```json
{
  "market_id": "0x778be094...",
  "crypto": "BTC",
  "timeframe": "5m",
  "slug": "btc-updown-5m-...",
  "crypto_price": 67420.50,
  "up": {
    "bestBid": 0.52,
    "bestAsk": 0.53,
    "midPrice": 0.525,
    "bids": [...],
    "asks": [...]
  },
  "down": {...}
}
```
