Hyperliquid — L2 book snapshot
Retrieve L2 book snapshot with the Hyperliquid API. The request takes a coin and a type. Use it for on-chain or crypto market research. Use the data in market research, dashboard views, or scheduled data collection for the relevant markets.
- Selected price
- $0 / callPublished pricing
- Sellers / APIs
- 1 / 1
- Requests · 30d
- —Loading...
- Success rate · 30d
- —Loading...
Hyperliquid — L2 book snapshot
Prepare your request, then continue with your agent.
Selected price
$0 / call
- Provider
- Pricing
On this page
Playground
Run sends a real API request. Charges follow the published API contract.
Response structure
coinstringlevelsobject[][]nintegerpxstringszstring
timeinteger
// Inferred from response examples. Fields are optional and other fields may be returned.
export type ApiResponse = {
coin?: string;
levels?: Array<Array<{
n?: number;
px?: string;
sz?: string;
}>>;
time?: number;
};Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
hyperliquidCurrent Hyperliquid — L2 book snapshot · POST · View API reference | $0 / call | — | —successP50— |
- Unit price
- $0
Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 3. Price update time: not supplied.
Total $0
API
- Method
- POST
- Endpoint
https://api.openany.si/v1/agent-apis/hyperliquid/info/l2-book- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
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"
}'Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
coin | JSON request bodybody | string | Yes | coin |
mantissa | JSON request bodybody | integer | No | 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 |
nSigFigs | JSON request bodybody | integer | null | No | 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 | JSON request bodybody | string | Yes | Fixed native Info query discriminator. const: "l2Book" · enum: "l2Book" |
Required markers inside a nested object or variant apply when that object or variant is used.
Sample response
Sample response · Documented HTTP 200 Published documentation example. Verify the actual response after an approved call.
{
"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
}Agent integration
Copy the resource contract without sharing an API key.
View API Markdown
# Hyperliquid — L2 book snapshot
Retrieve L2 book snapshot with the Hyperliquid API. The request takes a coin and a type. Use it for on-chain or crypto market research. Use the data in market research, dashboard views, or scheduled data collection for the relevant markets.
## Available implementations
hyperliquid · Hyperliquid — L2 book snapshot: https://openany.si/markets/apis/capabilities/hyperliquid-l2-book-snapshot?offering=34264029-e9e5-45ba-b387-428de9566dd1 · $0 / call
## Selected API contract
Documentation: https://openany.si/apis/34264029-e9e5-45ba-b387-428de9566dd1
Method: POST
Endpoint: https://api.openany.si/v1/agent-apis/hyperliquid/info/l2-book
Price: $0 / call
Provider: hyperliquid
Contract revision: 3
Price source: OpenAny public API contract and documented provider unit rates. Price update time: not supplied.
Use OPENANY_API_KEY from the environment. API Key calls use your shared balance.
## Prepared request
```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"
}'
```
## API contract
```json
{
"resource_type": "api",
"name": "Hyperliquid — L2 book snapshot",
"endpoint": "https://api.openany.si/v1/agent-apis/hyperliquid/info/l2-book",
"method": "POST",
"content_type": "application/json",
"execution_mode": "sync",
"authentication": {
"type": "bearer",
"environment_variable": "OPENANY_API_KEY"
},
"inputs": [
{
"description": "L2 book snapshot Documentation prepared only; runtime not verified.",
"json_schema": {
"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"
},
"location": "body",
"name": "body",
"nullable": false,
"pointer": "",
"required": true,
"type": "object"
}
],
"billing": {
"currency": "USD",
"mode": "fixed",
"priceMicroUsd": "0",
"rounding": null,
"unit": "call",
"unitQuantity": null
},
"examples": [
{
"http_status": 200,
"name": "Documentation example",
"request": {
"body": {
"coin": "BTC",
"type": "l2Book"
},
"headers": {},
"path": {},
"query": {}
},
"response_body": {
"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
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect the error and usage record before retrying a paid operation. |
Examples
Documentation example
Published documentation example. Verify the actual response after an approved call.
Prepare your environment
Use a terminal with cURL installed.
Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.
Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.
Terminal · macOS / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'Run the request
Paste the complete command below into your terminal.
Values to replace before running 1
Review these request fields before running. Keep the published provider and request method unchanged.
body- L2 book snapshot Documentation prepared only; runtime not verified.
Terminal · cURLcurl \ '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" }'Check the response
Sample response · Documented HTTP 200
Sample response{ "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 }