Orderbook Snapshot Endpoint
curl --request GET \
--url https://api.allium.so/api/v1/developer/trading/hyperliquid/orderbook/snapshot \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.allium.so/api/v1/developer/trading/hyperliquid/orderbook/snapshot"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.allium.so/api/v1/developer/trading/hyperliquid/orderbook/snapshot', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.allium.so/api/v1/developer/trading/hyperliquid/orderbook/snapshot",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.allium.so/api/v1/developer/trading/hyperliquid/orderbook/snapshot"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.allium.so/api/v1/developer/trading/hyperliquid/orderbook/snapshot")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.allium.so/api/v1/developer/trading/hyperliquid/orderbook/snapshot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Hyperliquid
L4 Orderbook snapshot
Get complete orderbook snapshot for all pairs.
GET
/
api
/
v1
/
developer
/
trading
/
hyperliquid
/
orderbook
/
snapshot
Orderbook Snapshot Endpoint
curl --request GET \
--url https://api.allium.so/api/v1/developer/trading/hyperliquid/orderbook/snapshot \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.allium.so/api/v1/developer/trading/hyperliquid/orderbook/snapshot"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.allium.so/api/v1/developer/trading/hyperliquid/orderbook/snapshot', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.allium.so/api/v1/developer/trading/hyperliquid/orderbook/snapshot",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.allium.so/api/v1/developer/trading/hyperliquid/orderbook/snapshot"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.allium.so/api/v1/developer/trading/hyperliquid/orderbook/snapshot")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.allium.so/api/v1/developer/trading/hyperliquid/orderbook/snapshot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}This endpoint provides a complete snapshot of the orderbook for all trading pairs with approximately 5-second freshness.
Compression RequiredThis endpoint requires brotli compression for efficient data transfer.
Response Structure
The response is an array of orderbook snapshots, where each entry contains:- Pair identifier - Trading pair (e.g.,
@1,@10) - Bids array - Buy orders sorted by price
- Asks array - Sell orders sorted by price
Example Response
Freshness is ~5s.[
[
"0G", <-- Pair
{
"book_orders": [
[ <-- Bids
[
"0x010461c14e146ac35fe42271bdc1134ee31c703a", <-- User
{
"coin": "0G",
"side": "B",
"limitPx": "2.1293",
"sz": "779.0",
"oid": 201304032517,
"timestamp": 1760539060740,
"triggerCondition": "N/A",
"isTrigger": false,
"triggerPx": "0.0",
"children": [],
"isPositionTpsl": false,
"reduceOnly": false,
"orderType": "Limit",
"origSz": "779.0",
"tif": "Alo",
"cloid": null
}
],
[
"0x31ca8395cf837de08b24da3f660e77761dfb974b", <-- User
{
"coin": "0G",
"side": "B",
"limitPx": "2.1293",
"sz": "785.0",
"oid": 201304032627,
"timestamp": 1760539060795,
"triggerCondition": "N/A",
"isTrigger": false,
"triggerPx": "0.0",
"children": [],
"isPositionTpsl": false,
"reduceOnly": false,
"orderType": "Limit",
"origSz": "785.0",
"tif": "Alo",
"cloid": null
}
],
],
[ <-- Asks
...
]
Authorizations
Response
Successful response
Was this page helpful?
⌘I