---
title: "Get L2 order book"
method: GET
path: "/l2book"
tags: ["Market Data"]
---

# Get L2 order book

`GET /l2book`

Returns current order book snapshot with optional filtering.

## Query parameters

- `type` 'l2book', required
- `coin` string, required
- `nlevels` integer
- `aggregation` number, double

## Response `200`

Successful response

- BookUpdate — Order book snapshot or delta
  - `updateType` 'snapshot' | 'delta' — `snapshot` = full order book state (both sides populated). `delta` = incremental update (only one side has levels, other is an empty array).
  - `symbol` string — Market symbol
  - `levels` array[] — Array with exactly 2 elements: `[bids, asks]` - Index 0: Bid levels (highest to lowest price) - Index 1: Ask levels (lowest to highest price) - For deltas: Only one side will have levels, the other will be an empty array `[]`
    - Level[]
      - `px` number — Price level
      - `sz` number — Total size at this price level
      - `n` integer — Number of orders at this price level. - For snapshots: Actual count of orders - For deltas: Always `0` (order count not tracked in deltas)
  - `timestamp` integer — Timestamp in milliseconds

## Other responses

- `400` — Bad Request - Invalid parameters or transaction type
- `404` — Not Found - Symbol or account doesn't exist
- `500` — Internal Server Error - Database or channel error

---

[API](https://skmtc.net/bulk/apis/bulk-trade-api.md) · [All operations](https://skmtc.net/bulk/apis/bulk-trade-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bulk/bulk-trade-api/versions/087f7b45aa1a/schema)
