perpSnapshots | Hyperliquid Info API
curl --request POST \
--url https://hypercore.goldrushdata.com/info \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"market_names": [
"<string>"
],
"format": "<string>"
}
'import requests
url = "https://hypercore.goldrushdata.com/info"
payload = {
"type": "<string>",
"market_names": ["<string>"],
"format": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: '<string>', market_names: ['<string>'], format: '<string>'})
};
fetch('https://hypercore.goldrushdata.com/info', 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://hypercore.goldrushdata.com/info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => '<string>',
'market_names' => [
'<string>'
],
'format' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://hypercore.goldrushdata.com/info"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"market_names\": [\n \"<string>\"\n ],\n \"format\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://hypercore.goldrushdata.com/info")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"market_names\": [\n \"<string>\"\n ],\n \"format\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hypercore.goldrushdata.com/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"market_names\": [\n \"<string>\"\n ],\n \"format\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"[0] size": {},
"[1] notional_size": {},
"[2] funding_pnl": {},
"[3] entry_price": {},
"[4] leverage_type_flag": {},
"[5] leverage": {},
"[6] liquidation_price": {},
"[7] account_value": {},
"snapshot_id": "<string>",
"timestamp": 123,
"markets": [
{}
]
}Info API
perpSnapshots | Hyperliquid Info API
Hyperliquid perpSnapshots: fetch every open perp position on Hyperliquid, with entry and liquidation prices, for liquidation maps and whale trackers.
POST
/
info
perpSnapshots | Hyperliquid Info API
curl --request POST \
--url https://hypercore.goldrushdata.com/info \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"market_names": [
"<string>"
],
"format": "<string>"
}
'import requests
url = "https://hypercore.goldrushdata.com/info"
payload = {
"type": "<string>",
"market_names": ["<string>"],
"format": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({type: '<string>', market_names: ['<string>'], format: '<string>'})
};
fetch('https://hypercore.goldrushdata.com/info', 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://hypercore.goldrushdata.com/info",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => '<string>',
'market_names' => [
'<string>'
],
'format' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://hypercore.goldrushdata.com/info"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"market_names\": [\n \"<string>\"\n ],\n \"format\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://hypercore.goldrushdata.com/info")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"market_names\": [\n \"<string>\"\n ],\n \"format\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hypercore.goldrushdata.com/info")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"market_names\": [\n \"<string>\"\n ],\n \"format\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"[0] size": {},
"[1] notional_size": {},
"[2] funding_pnl": {},
"[3] entry_price": {},
"[4] leverage_type_flag": {},
"[5] leverage": {},
"[6] liquidation_price": {},
"[7] account_value": {},
"snapshot_id": "<string>",
"timestamp": 123,
"markets": [
{}
]
}Credit Cost
250 per call
Processing
Batch
type: "perpSnapshots" is used to fetch every open perp position on Hyperliquid, with entry and liquidation prices, for liquidation maps and whale trackers.
Estimate your monthly cost for this API using the Pricing Calculator.
- GoldRush-native.
perpSnapshotsis not aPOST api.hyperliquid.xyz/infomethod. The public API only answers one wallet at a time (clearinghouseState), so you have to know the wallets in advance. - Compatible with existing
perpSnapshotsclients. The request body and the zstd/MessagePack wire format follow the standardperpSnapshotsformat, so a client that already speaks it works after you change its base URL and key. - Whole exchange, every dex. All wallets, all native perps and all HIP-3 dexes. A typical snapshot holds about 380,000 positions across about 360 markets and 125,000 wallets.
- Computed from the node’s own state. Each snapshot is read from the exchange state that a Hyperliquid node writes every 10,000 blocks (about every 12 minutes). Values follow Hyperliquid’s margin rules and were checked against
clearinghouseStatefor the same wallets. - Rate limited per key: 5 calls per 10 minutes. Poll the free perpSnapshotTimestamp and download only when
snapshot_idchanges. 250 credits per call, however many markets it returns.
"ALL:ALL_DEXES"). Use it to find the biggest longs and shorts on a market, map where liquidations cluster, measure long/short positioning by wallet, or diff positioning between two snapshots.
Endpoint
POST https://hypercore.goldrushdata.com/info
Authorization: Bearer <GOLDRUSH_API_KEY>
Content-Type: application/json
Request
1 to 256 market selectors. Each entry is one of:
Market names are case-sensitive, like Hyperliquid coins. A dex name is 1 to 64 characters from
| Entry | Selects |
|---|---|
"BTC" | one market on the native dex |
"xyz:NVDA" | one market on HIP-3 dex xyz |
"ALL" | every market on the native dex |
"ALL:xyz" | every market on HIP-3 dex xyz |
"ALL:ALL_DEXES" | every market on every dex (overrides every other entry) |
A-Z a-z 0-9 _; a market name is 1 to 64 characters from A-Z a-z 0-9 _ . / -."msgpack" (default, the standard binary perpSnapshots format) or "json". json returns the same data as JSON for at most 5 resolved markets. It is a GoldRush extension, handy for quick checks and small dashboards.How market_names is resolved
ALLpatterns expand to the markets present in the snapshot, that is, markets with at least one open position.- A single market already covered by an
ALLpattern for its dex is dropped, and duplicates are dropped. - A single market with no open positions (or that doesn’t exist) is left out, not an error.
ALL:<dex>with a dex that isn’t a Hyperliquid perp dex returns400 unknown dex. A real dex with no open positions resolves to zero markets.- Markets come back in a fixed order: native-dex markets first, then HIP-3 dexes by dex name, with markets sorted by name within each dex. Two identical requests against the same snapshot return byte-identical bodies.
Example
curl -X POST https://hypercore.goldrushdata.com/info \
-H "Authorization: Bearer $GOLDRUSH_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "perpSnapshots",
"market_names": ["BTC", "ETH", "HYPE"],
"format": "json"
}'
curl -X POST https://hypercore.goldrushdata.com/info \
-H "Authorization: Bearer $GOLDRUSH_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type": "perpSnapshots", "market_names": ["ALL:ALL_DEXES"]}' \
-D headers.txt -o snapshot.bin
# pip install requests msgpack zstandard
import os, struct
import msgpack, requests, zstandard
URL = "https://hypercore.goldrushdata.com/info"
HEADERS = {"Authorization": f"Bearer {os.environ['GOLDRUSH_API_KEY']}"}
FIELDS = ["size", "notional_size", "funding_pnl", "entry_price",
"leverage_type_flag", "leverage", "liquidation_price", "account_value"]
ZSTD_MAGIC = b"\x28\xb5\x2f\xfd"
def unzstd(chunk: bytes) -> bytes:
# Some HTTP clients already undo `Content-Encoding: zstd`; only decompress real zstd frames.
return zstandard.ZstdDecompressor().decompress(chunk) if chunk[:4] == ZSTD_MAGIC else chunk
def perp_snapshots(market_names):
r = requests.post(URL, headers=HEADERS, json={"type": "perpSnapshots", "market_names": market_names})
r.raise_for_status()
body = r.content
if r.headers.get("x-payload-format") == "multi-zstd":
(count,), offset, chunks = struct.unpack_from("<I", body), 4, []
for _ in range(count):
(length,) = struct.unpack_from("<I", body, offset)
chunks.append(body[offset + 4 : offset + 4 + length])
offset += 4 + length
else: # x-payload-format: msgpack, one market
chunks = [body]
markets = {}
for chunk in chunks:
snapshot_id, market, positions, addresses = msgpack.unpackb(unzstd(chunk))
markets[market] = [{"address": a, **dict(zip(FIELDS, p))} for a, p in zip(addresses, positions)]
return r.headers["x-snapshot-id"], markets
snapshot_id, markets = perp_snapshots(["BTC", "ETH", "HYPE"])
biggest = sorted(markets["BTC"], key=lambda p: p["notional_size"], reverse=True)[:10]
for p in biggest:
side = "LONG " if p["size"] > 0 else "SHORT"
print(side, p["address"], f"${p['notional_size']:,.0f}", "liq", p["liquidation_price"])
// npm i fzstd @msgpack/msgpack
import { decompress } from "fzstd";
import { decode } from "@msgpack/msgpack";
type Tuple = [number, number, number | null, number, 0 | 1 | null, number | null, number | null, number | null];
type Chunk = [snapshotId: string, market: string, positions: Tuple[], addresses: string[]];
const unzstd = (b: Uint8Array) =>
// Some fetch implementations already undo `Content-Encoding: zstd`.
b[0] === 0x28 && b[1] === 0xb5 && b[2] === 0x2f && b[3] === 0xfd ? decompress(b) : b;
async function perpSnapshots(marketNames: string[]) {
const res = await fetch("https://hypercore.goldrushdata.com/info", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.GOLDRUSH_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ type: "perpSnapshots", market_names: marketNames }),
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const body = new Uint8Array(await res.arrayBuffer());
const chunks: Uint8Array[] = [];
if (res.headers.get("x-payload-format") === "multi-zstd") {
const view = new DataView(body.buffer, body.byteOffset, body.byteLength);
let offset = 4;
for (let i = 0, n = view.getUint32(0, true); i < n; i++) {
const len = view.getUint32(offset, true);
chunks.push(body.subarray(offset + 4, offset + 4 + len));
offset += 4 + len;
}
} else {
chunks.push(body); // one market
}
return chunks.map((c) => {
const [snapshotId, market, positions, addresses] = decode(unzstd(c)) as Chunk;
return {
snapshotId,
market,
positions: positions.map(([size, notional, fundingPnl, entryPx, levFlag, leverage, liqPx, accountValue], i) => ({
address: addresses[i], size, notional, fundingPnl, entryPx,
leverageType: levFlag === null ? null : levFlag === 0 ? "cross" : "isolated",
leverage, liqPx, accountValue,
})),
};
});
}
const [btc] = await perpSnapshots(["BTC"]);
console.log(btc.snapshotId, btc.positions.length, "open BTC positions");
Response
The default response is binary, in the standardperpSnapshots format: zstd-compressed MessagePack, one chunk per market. A whole-exchange response (["ALL:ALL_DEXES"]) was 24.3 MB compressed on 2026-11-30 (388,681 positions on 357 markets), which is why the format is binary. Ask only for the markets you need.
Every 200 carries these headers:
| Header | Value |
|---|---|
x-snapshot-id | the snapshot’s snapshot_id |
x-snapshot-timestamp | the snapshot’s block time, epoch seconds |
Cache-Control | no-transform |
Framing
| Markets resolved | Headers | Body |
|---|---|---|
| exactly 1 | Content-Type: application/octet-stream, x-payload-format: msgpack, Content-Encoding: zstd | the market’s chunk |
| 0, or 2 and more | Content-Type: application/octet-stream, x-payload-format: multi-zstd, x-compression: inner-zstd | [count: u32][len_1: u32][chunk_1][len_2: u32][chunk_2]…, every u32 little-endian |
200 with a multi-zstd body whose count is 0, and it is billed.
A one-market body can reach your client already decoded: plain MessagePack, with no
Content-Encoding header. Many HTTP clients undo Content-Encoding: zstd themselves, and a proxy or CDN on the path can decode it when the request doesn’t accept zstd (it was recorded with Accept-Encoding: identity). Check for the zstd magic bytes (28 b5 2f fd) before decompressing, as the examples above do. Chunks inside a multi-zstd body are always zstd frames.Market chunk
Each chunk is one zstd frame. Decompressed, it is a MessagePack array:[snapshot_id: str, market: str, positions: [position_tuple], addresses: [str]]
addresses[i]ownspositions[i]. The two arrays have the same length, one entry per wallet with a non-zero position inmarket.marketis written as in the request ("BTC","xyz:NVDA").- Addresses are lowercase, and rows are sorted by address ascending.
Position tuple
A fixed 8-element MessagePack array, in this order:USD price at which the position is liquidated. For unified and portfolio-margin accounts it accounts for cross-collateral.
nil when there is none (the position is over-collateralised).USD account value of the wallet. For unified and portfolio-margin accounts it is the collateral pool shared with spot.
JSON response (format: "json")
The same data as JSON, for at most 5 markets, with Content-Type: application/json. leverage_type is spelled out ("cross" / "isolated"), and nil becomes null.
{
"snapshot_id": "20261130_state_1240000000",
"timestamp": 1796031360,
"markets": [
{
"market": "HYPE",
"positions": [
{
"address": "0x0000000000000000000000000000000000000001",
"size": -1200.5,
"notional_size": 52000.1,
"funding_pnl": -312.4,
"entry_price": 41.2,
"leverage_type": "cross",
"leverage": 10,
"liquidation_price": 58.9,
"account_value": 250000.0
}
]
}
]
}
One entry per resolved market, in the order described above, each
{market, positions}. positions fields match the tuple above, with address added and leverage_type_flag renamed leverage_type.Freshness
A new snapshot is captured every 10,000 HyperCore blocks, about every 12 minutes, and is served a minute or two later. GoldRush never serves positions older than 15 minutes: if the newest snapshot is older than that, the call returns503 snapshot_stale with Retry-After instead of old data.
To stay current at the lowest cost, poll perpSnapshotTimestamp every 5 to 10 seconds (0 credits) and call perpSnapshots only when its snapshot_id changes. Snapshots are point-in-time: for live, per-event position changes on a known set of wallets, use the WebSocket userFills stream or batchClearinghouseState.
Limits, errors and billing
- Credits: 250 per successful call, however many markets it returns. Errors are not billed.
- Rate limit: 5 calls per 10 minutes per API key, shared across all GoldRush servers. Only calls that pass validation count. This is the one exception to the Info API’s no rate limits rule, because a whole-exchange call is about 24 MB.
| Condition | Status | Body |
|---|---|---|
| Success | 200 | binary or JSON, see above |
| Missing or invalid key, no credits, suspended | 401 / 402 / 403 | standard auth error |
market_names missing, empty, not an array of strings | 400 | {"error":"invalid_body","message":"market_names must be a non-empty array of strings"} |
More than 256 market_names | 400 | {"error":"invalid_body","message":"too many market_names"} |
| An entry that doesn’t match the grammar | 400 | {"error":"invalid_body","message":"bad market name: <entry>"} |
ALL:<dex> with an unknown dex | 400 | {"error":"invalid_body","message":"unknown dex: <dex>"} |
format other than msgpack / json | 400 | {"error":"invalid_body","message":"format must be msgpack or json"} |
format: "json" resolving to more than 5 markets | 400 | {"error":"invalid_body","message":"format json allows at most 5 markets"} |
| No snapshot loaded yet | 404 | {"error":"no_snapshot"} |
| Over the per-key rate limit | 429 | {"error":"too_many_requests"}, with Retry-After: <seconds> |
| Newest snapshot older than 15 minutes | 503 | {"error":"snapshot_stale","message":"…"}, with Retry-After: 60 |
| Unexpected server failure | 502 | {"error":"upstream_error","message":"internal error"} |
Guides
How to get every open Hyperliquid position with perpSnapshots builds a liquidation heatmap, the largest and closest-to-liquidation positions, long/short positioning and a diff between two snapshots in Node.js, with every figure from a recorded snapshot.Using an existing perpSnapshots client
perpSnapshots and perpSnapshotTimestamp use the standard request bodies and wire format for these methods: the market_names grammar, the zstd/MessagePack chunks, the 8-field position tuple, the multi-zstd framing and headers, and a budget of 5 calls per 10 minutes. If you already have a client for them:
- Point it at
https://hypercore.goldrushdata.com/info. - Send your GoldRush API key as
Authorization: Bearer <GOLDRUSH_API_KEY>.
- Pricing per call: 250 credits per
perpSnapshotscall andperpSnapshotTimestampfree, on any GoldRush plan. No separate subscription. format: "json"for up to 5 markets.x-snapshot-idandx-snapshot-timestampheaders on every200.429body:{"error":"too_many_requests"}, with the wait in theRetry-Afterheader.- Never stale:
503 snapshot_stalerather than positions older than 15 minutes. - One key for everything: the same key and endpoint also serve the full Hyperliquid
/infoand/wsAPIs, with no rate limits.
/info surface.
Related endpoints
perpSnapshotTimestamp
check for a new all-positions perpSnapshots snapshot for free before downloading it.
batchClearinghouseState
fetch perpetuals account state for up to 50 wallets in a single request.
clearinghouseState
fetch a single user’s perpetuals account state by wallet address.
liquidatable
list accounts currently eligible for liquidation.
/info and /ws APIs at hypercore.goldrushdata.com, with no rate limits and every fill, order, trade, funding and ledger event retained from the start of HyperCore coverage.