# Hyperliquid — L2 book snapshot

Get Hyperliquid L2 Order Book data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Hyperliquid, pass parameters such as coin, type, and retrieve structured data including coin identifier, snapshot timestamp, and reported aggregation count for depth displays, and aggregation comparisons, ready for production pipelines and AI agent automation.

Documentation: https://openany.si/market/apis/hyperliquid/hyperliquid-l2-book-snapshot/?offering=34264029-e9e5-45ba-b387-428de9566dd1
API ID: 34264029-e9e5-45ba-b387-428de9566dd1
Provider: hyperliquid
Contract revision: 4
Method: POST
Endpoint: https://api.openany.si/v1/agent-apis/hyperliquid/info/l2-book
Page update time: 2026-12-03T02:49:32.826Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: application/json
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0 / call
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract. Price update time: not supplied.
Contract update time: 2026-12-03T02:49:32.467Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "0",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Hyperliquid — L2 book snapshot request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {}
    },
    "headers": {
      "type": "object",
      "properties": {}
    },
    "body": {
      "additionalProperties": false,
      "allOf": [
        {
          "if": {
            "required": [
              "mantissa"
            ]
          },
          "then": {
            "properties": {
              "nSigFigs": {
                "const": 5
              }
            },
            "required": [
              "nSigFigs"
            ]
          }
        }
      ],
      "examples": [
        {
          "coin": "BTC",
          "type": "l2Book"
        }
      ],
      "properties": {
        "coin": {
          "description": "coin",
          "example": "BTC",
          "type": "string"
        },
        "mantissa": {
          "description": "Optional field to aggregate levels. This field is only allowed if nSigFigs is 5. Accepts values of 1, 2 or 5. Only supply when nSigFigs=5.",
          "enum": [
            1,
            2,
            5
          ],
          "type": "integer"
        },
        "nSigFigs": {
          "description": "Optional field to aggregate levels to `nSigFigs` significant figures. Valid values are 2, 3, 4, 5, and `null`, which means full precision",
          "enum": [
            2,
            3,
            4,
            5,
            null
          ],
          "type": [
            "integer",
            "null"
          ]
        },
        "type": {
          "const": "l2Book",
          "description": "Fixed native Info query discriminator.",
          "enum": [
            "l2Book"
          ],
          "example": "l2Book",
          "type": "string"
        }
      },
      "required": [
        "type",
        "coin"
      ],
      "type": "object",
      "description": "L2 book snapshot Documentation prepared only; runtime not verified."
    }
  },
  "required": [
    "path",
    "query",
    "headers",
    "body"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "coin": {
      "type": "string"
    },
    "levels": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "n": {
              "type": "integer"
            },
            "px": {
              "type": "string"
            },
            "sz": {
              "type": "string"
            }
          }
        }
      }
    },
    "time": {
      "type": "integer"
    }
  }
}
```

## Request example
Scenario: Documentation example
```bash
curl \
  'https://api.openany.si/v1/agent-apis/hyperliquid/info/l2-book' \
  -X POST \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "coin": "BTC",
  "type": "l2Book"
}'
```

## Response example
Published documentation example. Verify the actual response after an approved call.
Sample response · Documented HTTP 200
```json
{
  "coin": "BTC",
  "levels": [
    [
      {
        "n": 5,
        "px": "79929.0",
        "sz": "0.68339"
      },
      {
        "n": 2,
        "px": "79928.0",
        "sz": "0.23287"
      },
      {
        "n": 2,
        "px": "79925.0",
        "sz": "0.30155"
      },
      {
        "n": 2,
        "px": "79924.0",
        "sz": "0.03767"
      },
      {
        "n": 1,
        "px": "79923.0",
        "sz": "0.005"
      },
      {
        "n": 2,
        "px": "79922.0",
        "sz": "0.00778"
      },
      {
        "n": 5,
        "px": "79921.0",
        "sz": "0.30857"
      },
      {
        "n": 2,
        "px": "79920.0",
        "sz": "0.50561"
      },
      {
        "n": 2,
        "px": "79919.0",
        "sz": "1.15944"
      },
      {
        "n": 2,
        "px": "79918.0",
        "sz": "1.00965"
      },
      {
        "n": 5,
        "px": "79917.0",
        "sz": "3.53863"
      },
      {
        "n": 5,
        "px": "79916.0",
        "sz": "3.06787"
      },
      {
        "n": 5,
        "px": "79915.0",
        "sz": "0.3626"
      },
      {
        "n": 6,
        "px": "79914.0",
        "sz": "1.55306"
      },
      {
        "n": 8,
        "px": "79913.0",
        "sz": "14.12504"
      },
      {
        "n": 7,
        "px": "79912.0",
        "sz": "3.57623"
      },
      {
        "n": 7,
        "px": "79911.0",
        "sz": "0.77929"
      },
      {
        "n": 6,
        "px": "79910.0",
        "sz": "0.85802"
      },
      {
        "n": 8,
        "px": "79909.0",
        "sz": "6.41416"
      },
      {
        "n": 10,
        "px": "79908.0",
        "sz": "4.97828"
      }
    ],
    [
      {
        "n": 56,
        "px": "79930.0",
        "sz": "15.93731"
      },
      {
        "n": 8,
        "px": "79931.0",
        "sz": "2.64161"
      },
      {
        "n": 5,
        "px": "79932.0",
        "sz": "0.92201"
      },
      {
        "n": 5,
        "px": "79933.0",
        "sz": "1.06059"
      },
      {
        "n": 9,
        "px": "79934.0",
        "sz": "3.14853"
      },
      {
        "n": 9,
        "px": "79935.0",
        "sz": "2.18579"
      },
      {
        "n": 16,
        "px": "79936.0",
        "sz": "2.7289"
      },
      {
        "n": 8,
        "px": "79937.0",
        "sz": "3.07894"
      },
      {
        "n": 11,
        "px": "79938.0",
        "sz": "3.85744"
      },
      {
        "n": 10,
        "px": "79939.0",
        "sz": "5.12866"
      },
      {
        "n": 11,
        "px": "79940.0",
        "sz": "6.57674"
      },
      {
        "n": 5,
        "px": "79941.0",
        "sz": "1.57544"
      },
      {
        "n": 5,
        "px": "79942.0",
        "sz": "1.81881"
      },
      {
        "n": 10,
        "px": "79943.0",
        "sz": "3.40509"
      },
      {
        "n": 9,
        "px": "79944.0",
        "sz": "4.77732"
      },
      {
        "n": 7,
        "px": "79945.0",
        "sz": "1.4714"
      },
      {
        "n": 13,
        "px": "79946.0",
        "sz": "10.57766"
      },
      {
        "n": 8,
        "px": "79947.0",
        "sz": "8.99149"
      },
      {
        "n": 7,
        "px": "79948.0",
        "sz": "6.72707"
      },
      {
        "n": 5,
        "px": "79949.0",
        "sz": "2.11159"
      }
    ]
  ],
  "time": 1793258524591
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Available implementations
- hyperliquid: https://openany.si/market/apis/hyperliquid/hyperliquid-l2-book-snapshot/?offering=34264029-e9e5-45ba-b387-428de9566dd1

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
