> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sonarx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Public L2 Order Book Snapshots

> Freely available L2 summary order book snapshots for Hyperliquid HIP-3 and standard perpetual DEX markets via public S3 bucket under CC0 1.0, with full-depth L2 and L4 data available for purchase.

SonarX provides **L2 summary order book snapshots** for all Hyperliquid HIP-3 and standard perpetual DEX markets in a public S3 bucket. No account or API key is required.

The data is released under the **CC0 1.0 Universal (Creative Commons)** license — free to use, share, and build on for any purpose without restriction.

## What Are L2 Summary Snapshots?

L2 summary snapshots provide a compact view of the top 20 price levels on each side of the order book, captured every 20 blocks. Each snapshot includes:

* **Price** (`px`) — the aggregated price level
* **Size** (`sz`) — total size across all orders at that level
* **Order count** (`n`) — number of individual orders at that level
* **Block height and timestamp** — exact on-chain reference point

This gives you a lightweight, high-frequency view of market depth without needing to reconstruct the full book yourself.

## Sample Data

Each file contains a JSON array of snapshots. Here is a truncated example from the `hyna:BTC` market:

```json theme={null}
[
  {
    "height": 901329020,
    "block_time": "2026-02-21T11:02:26.827929333",
    "market": "hyna:BTC",
    "bids": [
      { "px": "68182.0", "sz": "0.05387", "n": 4 },
      { "px": "68181.0", "sz": "0.00079", "n": 1 },
      { "px": "68174.0", "sz": "0.14664", "n": 1 },
      { "px": "68172.0", "sz": "0.7332", "n": 1 },
      { "px": "68166.0", "sz": "2.19963", "n": 1 }
    ],
    "asks": [
      { "px": "68183.0", "sz": "0.01874", "n": 1 },
      { "px": "68188.0", "sz": "0.15", "n": 1 },
      { "px": "68194.0", "sz": "0.01124", "n": 1 },
      { "px": "68197.0", "sz": "0.10084", "n": 1 },
      { "px": "68199.0", "sz": "3.07924", "n": 3 }
    ]
  }
]
```

Each snapshot contains up to 20 bid and 20 ask levels (truncated above for brevity). Snapshots are taken every 20 blocks, so a single file covers a range of block heights with multiple entries in the array.

## How to Access the Data

The snapshots are stored as gzipped JSON in the `sonarx-hyperliquid-public` S3 bucket (requester-pays).

### Bucket Paths

**HIP-3 markets:**

```
s3://sonarx-hyperliquid-public/market_data/hip3/{market}/l2-summary-snapshots/{partition}/{height}.json.gz
```

**Standard perp markets:**

```
s3://sonarx-hyperliquid-public/market_data/perp/{market}/l2-summary-snapshots/{partition}/{height}.json.gz
```

### Example: Download a File

```bash theme={null}
# HIP-3 market
aws s3 cp s3://sonarx-hyperliquid-public/market_data/hip3/hyna:BTC/l2-summary-snapshots/886370000/886372000.json.gz . --request-payer

# Standard perp market
aws s3 cp s3://sonarx-hyperliquid-public/market_data/perp/BTC/l2-summary-snapshots/886370000/886372000.json.gz . --request-payer
```

<Info>
  The bucket is **requester-pays**, so you must include `--request-payer` when using the AWS CLI. Standard S3 data transfer costs apply to the requester.
</Info>

### Refresh Cadence

Data is loaded to the public bucket **weekly with a two-day lag**. For example, a Saturday load will include everything through Thursday.

## Market Coverage

The public snapshots currently cover **HIP-3 perpetual DEX markets** and **standard perpetual markets** on Hyperliquid.

Coverage for spot markets will follow.

***

## Full-Depth L2 and L4 Order Books (Available for Purchase)

Need more than the top 20 levels? SonarX produces **full-depth L2 and L4 order book data** for all Hyperliquid markets, available for purchase.

<CardGroup cols={2}>
  <Card title="Full L2 Snapshots" icon="chart-bar">
    Every aggregated price level in the book — not limited to the top 20. See complete market depth across all bids and asks.
  </Card>

  <Card title="L4 Snapshots" icon="list-ol">
    Individual order-level data including order IDs, sides, prices, sizes, and user addresses. The most granular view of the order book available.
  </Card>
</CardGroup>

### Full L2 Snapshot Format

Full L2 snapshots share the same schema as the public L2 summaries but include **every aggregated price level** in the book, not just the top 20. Each level aggregates all individual orders at that price.

```json theme={null}
[
  {
    "height": 885100,
    "block_time": "2026-02-06T08:59:59.329723217",
    "market": "ETH",
    "bids": [
      { "px": "2650.5", "sz": "25.0", "n": 3 },
      { "px": "2650.4", "sz": "100.0", "n": 15 },
      { "px": "2650.3", "sz": "50.0", "n": 8 }
    ],
    "asks": [
      { "px": "2651.0", "sz": "15.0", "n": 2 },
      { "px": "2651.1", "sz": "30.0", "n": 5 },
      { "px": "2651.2", "sz": "200.0", "n": 42 }
    ]
  }
]
```

| Field        | Description                                    |
| :----------- | :--------------------------------------------- |
| `height`     | Block height at time of snapshot               |
| `block_time` | Block timestamp                                |
| `market`     | Market symbol                                  |
| `bids[].px`  | Aggregated bid price level                     |
| `bids[].sz`  | Total size across all orders at that bid price |
| `bids[].n`   | Number of individual orders at that bid price  |
| `asks[].px`  | Aggregated ask price level                     |
| `asks[].sz`  | Total size across all orders at that ask price |
| `asks[].n`   | Number of individual orders at that ask price  |

Bids are sorted descending by price (best bid first). Asks are sorted ascending by price (best ask first).

### L4 Snapshot Format

L4 snapshots contain **every individual order** in the book — the most granular view available. Each order includes its unique order ID, the trader's address, side, price, and size.

```json theme={null}
[
  {
    "height": 885100,
    "block_time": "2026-02-06T08:59:59.329723217",
    "market": "ETH",
    "order_count": 1542,
    "bids": [
      { "oid": 123456, "px": "2650.5", "sz": "10.0", "user": "0xabc..." },
      { "oid": 123457, "px": "2650.4", "sz": "5.5", "user": "0xdef..." }
    ],
    "asks": [
      { "oid": 123458, "px": "2651.0", "sz": "5.0", "user": "0xghi..." },
      { "oid": 123459, "px": "2651.1", "sz": "8.0", "user": "0xjkl..." }
    ]
  }
]
```

| Field         | Description                                   |
| :------------ | :-------------------------------------------- |
| `height`      | Block height at time of snapshot              |
| `block_time`  | Block timestamp                               |
| `market`      | Market symbol                                 |
| `order_count` | Total number of individual orders in the book |
| `bids[].oid`  | Unique order ID                               |
| `bids[].px`   | Order price                                   |
| `bids[].sz`   | Order size                                    |
| `bids[].user` | Trader address                                |
| `asks[].oid`  | Unique order ID                               |
| `asks[].px`   | Order price                                   |
| `asks[].sz`   | Order size                                    |
| `asks[].user` | Trader address                                |

### Comparison: L2 Summary vs Full L2 vs L4

<CardGroup cols={3}>
  <Card title="L2 Summary (Public)" icon="eye">
    * **Depth:** Top 20 levels per side
    * **Granularity:** Aggregated by price
    * **User address:** No
    * **Order count:** Yes
    * **Freshness:** Weekly with two-day lag
    * **Use cases:** Market overview, spreads, top-of-book analysis
    * **Availability:** Free (public S3, CC0 1.0)
  </Card>

  <Card title="Full L2" icon="chart-bar">
    * **Depth:** All price levels
    * **Granularity:** Aggregated by price
    * **User address:** No
    * **Order count:** Yes
    * **Freshness:** Near real-time via file delivery; also available via [streaming](/api-reference/kafka)
    * **Use cases:** Full depth analysis, liquidity profiling, slippage modeling
    * **Availability:** Available for purchase
  </Card>

  <Card title="L4" icon="list-ol">
    * **Depth:** Every individual order
    * **Granularity:** Per-order with order IDs
    * **User address:** Yes
    * **Order count:** N/A (one row per order)
    * **Freshness:** Near real-time via file delivery; also available via [streaming](/api-reference/kafka)
    * **Use cases:** Order flow analysis, market microstructure research, trader behavior
    * **Availability:** Available for purchase
  </Card>
</CardGroup>

<Tip>
  Full L2 and L4 order book history is available for purchase through SonarX. [Reach out to the SonarX team](https://sonarx.com#contact) to learn more about pricing and access.
</Tip>
