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

# L2 Orderbook

Returns the L2 orderbook for a single asset.

Each level has `px` (price), `sz` (aggregate size), and `n` (number of resting orders at that level). `levels[0]` = bids (descending), `levels[1]` = asks (ascending).

## Example

```bash theme={null}
curl -H "x-api-key: YOUR_KEY" "https://hyper.polynode.dev/v2/orderbook?coin=BTC"
```

```json theme={null}
{
  "coin": "BTC",
  "time": 1776093910691,
  "levels": [
    [
      {"px": "71843.0", "sz": "16.5998", "n": 51},
      {"px": "71842.0", "sz": "1.16671", "n": 6}
    ],
    [
      {"px": "71844.0", "sz": "12.3456", "n": 38},
      {"px": "71845.0", "sz": "0.98765", "n": 4}
    ]
  ]
}
```

| Field       | Description                    |
| ----------- | ------------------------------ |
| `coin`      | Asset name                     |
| `time`      | Timestamp (Unix ms)            |
| `levels[0]` | Bids (descending by price)     |
| `levels[1]` | Asks (ascending by price)      |
| `px`        | Price level                    |
| `sz`        | Total size at this level       |
| `n`         | Number of orders at this level |


## OpenAPI

````yaml GET /exchange/orderbook
openapi: 3.1.0
info:
  title: hypernode API
  description: >-
    Real-time HyperLiquid L1 streaming and REST API for market data, trading,
    and account management.
  contact:
    name: hypernode
    url: https://hyper.polynode.dev
  version: 1.0.0
servers:
  - url: https://hyper.polynode.dev
    description: Production
security: []
paths:
  /exchange/orderbook:
    get:
      tags:
        - Market Data
      summary: L2 orderbook
      operationId: get_orderbook
      parameters:
        - name: coin
          in: query
          required: true
          schema:
            type: string
        - name: network
          in: query
          required: false
          schema:
            type: string
            default: mainnet
      responses:
        '200':
          description: Orderbook snapshot
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/L2Book'
components:
  schemas:
    L2Book:
      type: object
      properties:
        coin:
          type: string
        time:
          type: integer
        levels:
          type: array
          description: Index 0 = bids (descending), index 1 = asks (ascending)
          items:
            type: array
            items:
              $ref: '#/components/schemas/PriceLevel'
    PriceLevel:
      type: object
      properties:
        px:
          type: string
          description: Price
        sz:
          type: string
          description: Aggregate size
        'n':
          type: integer
          description: Number of orders

````