How to get every open Hyperliquid position with perpSnapshots, and build a liquidation heatmap

GoldRush TeamUpdated 16 min read

perpSnapshots returns every open Hyperliquid perp position with its liquidation price in one call. Decode it in Node.js and build a liquidation heatmap.

perpSnapshots is a GoldRush Hyperliquid Info API method that returns every open perpetual position on Hyperliquid in one call: each wallet's size, notional, entry price, leverage, funding and liquidation price, on every native and HIP-3 market. The snapshot recorded for this guide (block 1,240,360,000, 30 November 2026 at 13:09 UTC) held 388,681 positions across 129,692 wallets and 357 markets, with $5.30 billion of open interest. The liquidation prices are real, so a liquidation heatmap built from them is a sum over actual positions.

Below, you call perpSnapshots from Node.js, decode its binary response and build four things from it: a liquidation heatmap, a list of the largest positions and those closest to liquidation, long/short positioning per market, and a diff of what changed between two snapshots.

What perpSnapshots returns

The public Hyperliquid API answers one wallet at a time (clearinghouseState), so to see a whole market you would need to know and poll every address on it. perpSnapshots returns all of them. A new snapshot is computed from the full exchange state that a Hyperliquid node writes every 10,000 blocks, about every 12 minutes. GoldRush never serves one more than 15 minutes old.

                             ╔═ GoldRush Hyperliquid API ══════╗
                             ║                                 ║░
                             ║   ╔═══════════════════════════╗ ║░
                             ║   ║ 1 · perpSnapshotTimestamp ║ ║░
╔═════════════════════╗      ║   ║ snapshot_id changed?      ║ ║░     ╔═════════════════════╗
║ Hyperliquid node    ║░     ║   ╚═══════════════════════════╝ ║░     ║ Your script         ║░
║ full exchange state ║░     ║                                 ║░     ║ liquidation heatmap ║░
║ every 10,000 blocks ║░ ──▶ ║   ╔═══════════════════════════╗ ║░ ──▶ ║ largest positions   ║░
║ (about 12 minutes)  ║░     ║   ║ 2 · perpSnapshots         ║ ║░     ║ long/short          ║░
╚═════════════════════╝░     ║   ║ every open position       ║ ║░     ╚═════════════════════╝░
 ░░░░░░░░░░░░░░░░░░░░░░░     ║   ║ 388,681 on 357 markets    ║ ║░      ░░░░░░░░░░░░░░░░░░░░░░░
                             ║   ╚═══════════════════════════╝ ║░
                             ║                                 ║░
                             ╚═════════════════════════════════╝░
                              ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
Every 10,000 blocks the node's state becomes a snapshot; your script checks the free timestamp, then downloads

Each position has eight fields:

Field Meaning
size Signed size in coin units: positive is long, negative is short
notional_size USD notional, abs(size) × mark price
funding_pnl USD funding since the position opened; received is positive
entry_price USD entry price
leverage_type cross or isolated
leverage Integer leverage, such as 20
liquidation_price USD price at which the position is liquidated, or null if the account can't be liquidated
account_value USD account value of the wallet

The largest markets in the recorded snapshot, with how many long positions there were for each short one:

Market Positions Open interest Long positions per short
BTC 37,249 $1,129.7M 2.13
HYPE 17,982 $610.4M 2.47
ETH 18,024 $539.5M 1.64
xyz:SP500 5,003 $232.6M 1.67
xyz:NVDA 10,354 $173.0M 6.07
xyz:XYZ100 4,037 $169.9M 2.28

Markets with a dex prefix (xyz:) are HIP-3 markets: perps deployed by builders on Hyperliquid, here a US stock index, a stock and a tech index. Every long is matched by a short of the same notional, so open interest splits evenly between the two sides. The number of positions on each side varies: on xyz:NVDA six traders were long for every one who was short.

Prerequisites

  • Node.js 20 or later. The samples are tested on Node.js 24. Save each script as a .mjs file so top-level await works.
  • A GoldRush API key. A new account gets a 14-day free trial with 25,000 credits.
  • Two packages, to decompress zstd and decode MessagePack:
mkdir perp-snapshots && cd perp-snapshotsnpm init -ynpm install fzstd@0.1.1 @msgpack/msgpack@3.1.3export GOLDRUSH_API_KEY=your_goldrush_api_key

Step 1: Check for a new snapshot with perpSnapshotTimestamp

perpSnapshots costs 250 per call and is limited to 5 calls per 10 minutes per API key, while a new snapshot appears only about every 12 minutes. perpSnapshotTimestamp costs 0 per call and has no per-key limit, so poll it and download only when its snapshot_id changes. Save this as perp-snapshots.mjs; the other scripts import it:

import { decode } from "@msgpack/msgpack";import { decompress } from "fzstd"; const INFO_URL = "https://hypercore.goldrushdata.com/info"; async function post(body) {  const res = await fetch(INFO_URL, {    method: "POST",    headers: {      Authorization: `Bearer ${process.env.GOLDRUSH_API_KEY}`,      "Content-Type": "application/json",    },    body: JSON.stringify(body),  });  if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);  return res;} // The id of the newest snapshot. Free to call, so poll it and download only when it changes.export async function latestSnapshotId() {  const res = await post({ type: "perpSnapshotTimestamp" });  return (await res.json()).snapshot_id;}

The response names the snapshot and its block time in epoch seconds:

{  "snapshot_id": "20261130_state_1240360000",  "timestamp": 1796044140}

The id is <UTC date>_state_<block height>. Compare it for equality only.

Step 2: Download and decode every position with perpSnapshots

perpSnapshots takes market_names, a list of 1 to 256 selectors: a native market ("BTC"), a HIP-3 market ("xyz:NVDA"), every native market ("ALL"), every market on one HIP-3 dex ("ALL:xyz"), or the whole exchange ("ALL:ALL_DEXES"). A market with no open positions is left out of the response, not reported as an error.

The response is binary: one zstd-compressed MessagePack array per market. With one market the body is that array. With several, each array is prefixed by its length:

╔══════════════════════╗            ╔════════════════════╗               ╔════════════════════╗
║ Response body        ║░           ║ One market chunk   ║░              ║ One position tuple ║░
║ multi-zstd           ║░           ║ "20261130_state_…" ║░              ║ 0 size  1 notional ║░
║ count 2              ║░           ║ "xyz:AAPL"         ║░              ║ 2 funding  3 entry ║░
║ len · xyz:AAPL chunk ║░ ──zstd──▶ ║ 1,928 tuples       ║░ ──index i──▶ ║ 4 cross/isolated   ║░
║ len · xyz:CL chunk   ║░           ║ 1,928 addresses    ║░              ║ 5 leverage  6 liq. ║░
╚══════════════════════╝░           ╚════════════════════╝░              ║ 7 account value    ║░
 ░░░░░░░░░░░░░░░░░░░░░░░░            ░░░░░░░░░░░░░░░░░░░░░░              ╚════════════════════╝░
                                                                          ░░░░░░░░░░░░░░░░░░░░░░
A two-market response: each length-prefixed chunk decompresses to one market, and tuple i belongs to address i

Add this to perp-snapshots.mjs. It reads the x-payload-format header to tell the two framings apart, and checks for the zstd magic bytes because some HTTP clients decompress a Content-Encoding: zstd body for you:

// The 8 fields of each position tuple, in wire order.const FIELDS = [  "size",  "notionalSize",  "fundingPnl",  "entryPrice",  "leverageType",  "leverage",  "liquidationPrice",  "accountValue",]; // A zstd frame starts with these 4 bytes. Some HTTP clients undo `Content-Encoding: zstd` themselves.const isZstd = (b) => b[0] === 0x28 && b[1] === 0xb5 && b[2] === 0x2f && b[3] === 0xfd; // One market: the body is the chunk. Otherwise: [count u32][length u32][chunk]..., little-endian.function chunksOf(body, payloadFormat) {  if (payloadFormat !== "multi-zstd") return [body];  const view = new DataView(body.buffer, body.byteOffset, body.byteLength);  const chunks = [];  let offset = 4;  for (let i = 0; i < view.getUint32(0, true); i++) {    const length = view.getUint32(offset, true);    chunks.push(body.subarray(offset + 4, offset + 4 + length));    offset += 4 + length;  }  return chunks;} // Every open position on the requested markets, as Map<market, position[]>.export async function perpSnapshots(marketNames) {  const res = await post({ type: "perpSnapshots", market_names: marketNames });  const body = new Uint8Array(await res.arrayBuffer());  const markets = new Map();  for (const chunk of chunksOf(body, res.headers.get("x-payload-format"))) {    const [, market, tuples, addresses] = decode(isZstd(chunk) ? decompress(chunk) : chunk);    const positions = tuples.map((tuple, i) => {      const p = { address: addresses[i], market };      FIELDS.forEach((field, j) => (p[field] = tuple[j]));      p.leverageType = tuple[4] === 0 ? "cross" : tuple[4] === 1 ? "isolated" : null;      return p;    });    markets.set(market, positions);  }  return { snapshotId: res.headers.get("x-snapshot-id"), markets };} // Every position in a market is valued at one mark price, so notional / |size| gives it back.export const markPrice = (positions) => positions[0].notionalSize / Math.abs(positions[0].size);

The whole exchange (["ALL:ALL_DEXES"]) was 24.3 MB in the recorded snapshot, so ask only for the markets you need. To look at a few markets by eye, add "format": "json" to the request (up to 5 markets per call) and the same data comes back as JSON. This is the largest xyz:AAPL short in the recorded snapshot:

{  "snapshot_id": "20261130_state_1240360000",  "timestamp": 1796044140,  "markets": [    {      "market": "xyz:AAPL",      "positions": [        {          "address": "0xf517639a8872e756ac98d3c65507d2ebc25cc032",          "size": -49400.717,          "notional_size": 17655816.2558,          "funding_pnl": -3115.925334,          "entry_price": 346.157,          "leverage_type": "cross",          "leverage": 20,          "liquidation_price": 480.6010234927702,          "account_value": 9555608.58873        }      ]    }  ]}

Step 3: Build a Hyperliquid liquidation heatmap

A liquidation heatmap shows how much notional is liquidated if the price reaches each level. Longs are liquidated below the mark price and shorts above it. With real positions it is a sum: put each position's liquidation_price into a 1% band around the mark price and add up its notional. Positions whose liquidation_price is null can't be liquidated, so they are left out. Save this as heatmap.mjs:

const market = process.argv[2] ?? "BTC";const BAND_PCT = 1; // band width, % of the mark priceconst RANGE_PCT = 10; // bands from -10% to +10% const { snapshotId, markets } = await perpSnapshots([market]);const positions = markets.get(market) ?? [];if (positions.length === 0) throw new Error(`no open positions on ${market}`);const mark = markPrice(positions); const bands = new Map(); // band start (%) -> { long, short } notional in USDfor (const p of positions) {  if (p.liquidationPrice === null) continue; // can't be liquidated  const distancePct = (p.liquidationPrice / mark - 1) * 100;  if (Math.abs(distancePct) >= RANGE_PCT) continue;  const band = Math.floor(distancePct / BAND_PCT) * BAND_PCT;  const row = bands.get(band) ?? { long: 0, short: 0 };  row[p.size > 0 ? "long" : "short"] += p.notionalSize;  bands.set(band, row);} const usd = (n) => "$" + Math.round(n).toLocaleString("en-US");console.log(`${market} mark ${mark.toFixed(2)}, snapshot ${snapshotId}`);for (const band of [...bands.keys()].sort((a, b) => b - a)) {  const low = mark * (1 + band / 100);  const high = mark * (1 + (band + BAND_PCT) / 100);  const { long, short } = bands.get(band);  console.log(    `${band > 0 ? "+" : ""}${band}%`.padStart(5),    `${low.toFixed(2)}-${high.toFixed(2)}`.padEnd(16),    `longs ${usd(long)}`.padEnd(18),    `shorts ${usd(short)}`  );}

The script needs one line at the top to import the client: import { markPrice, perpSnapshots } from "./perp-snapshots.mjs";. Run it with node heatmap.mjs xyz:AAPL. On the recorded snapshot it printed:

xyz:AAPL mark 357.40, snapshot 20261130_state_1240360000  +9% 389.57-393.14    longs $0           shorts $733  +8% 385.99-389.57    longs $0           shorts $491,652  +7% 382.42-385.99    longs $0           shorts $9,540,309  +6% 378.84-382.42    longs $0           shorts $113,599  +5% 375.27-378.84    longs $0           shorts $289,430  +4% 371.70-375.27    longs $0           shorts $113,945  +3% 368.12-371.70    longs $0           shorts $517,606  +2% 364.55-368.12    longs $0           shorts $507,583  +1% 360.97-364.55    longs $0           shorts $814,662   0% 357.40-360.97    longs $0           shorts $108  -2% 350.25-353.83    longs $207         shorts $0  -3% 346.68-350.25    longs $62,022      shorts $0  -4% 343.10-346.68    longs $38,187      shorts $0  -5% 339.53-343.10    longs $188,264     shorts $0  -6% 335.96-339.53    longs $1,309       shorts $0  -7% 332.38-335.96    longs $6,054       shorts $0  -8% 328.81-332.38    longs $14,403      shorts $0  -9% 325.23-328.81    longs $186,672     shorts $0 -10% 321.66-325.23    longs $4,126       shorts $0
Horizontal bar chart of xyz:AAPL liquidations per 1% price band: shorts above the 357.40 mark price, peaking at $9.5 million in the 382.42 to 385.99 band, and much smaller longs below it.
The same output drawn as a liquidation heatmap: notional liquidated per 1% band, shorts above the mark and longs below.

xyz:AAPL was lopsided: $12.4 million of shorts would be liquidated within 10% above the mark, $9.5 million of it in the single band from 382.42 to 385.99, against $0.5 million of longs within 10% below it. A rise of about 7% would have forced those shorts to buy. To draw the heatmap over time, save one row per band per snapshot and plot the bands as cells against the snapshot time.

Step 4: Find the largest positions and those closest to liquidation

Sorting the same positions answers two more questions: who holds the most, and who is nearest to being liquidated. Save this as positions.mjs and run node positions.mjs xyz:AAPL:

const market = process.argv[2] ?? "BTC";const { markets } = await perpSnapshots([market]);const positions = markets.get(market) ?? [];const mark = markPrice(positions); const row = (p) => ({  side: p.size > 0 ? "long" : "short",  notional: Math.round(p.notionalSize),  leverage: `${p.leverage}x ${p.leverageType}`,  entry: p.entryPrice,  liquidation: p.liquidationPrice === null ? "none" : Number(p.liquidationPrice.toFixed(2)),  address: p.address,}); console.log(`Largest ${market} positions`);console.table(  [...positions]    .sort((a, b) => b.notionalSize - a.notionalSize)    .slice(0, 5)    .map(row)); const distance = (p) => Math.abs(p.liquidationPrice / mark - 1);console.log(`${market} positions over $10,000 closest to liquidation (mark ${mark.toFixed(2)})`);console.table(  positions    .filter((p) => p.liquidationPrice !== null && p.notionalSize > 10_000)    .sort((a, b) => distance(a) - distance(b))    .slice(0, 5)    .map((p) => ({ ...row(p), away: (distance(p) * 100).toFixed(2) + "%" })));

It needs the same import line as heatmap.mjs. On the recorded snapshot:

Largest xyz:AAPL positions┌─────────┬─────────┬──────────┬─────────────┬─────────┬─────────────┬──────────────────────────────────────────────┐│ (index) │ side    │ notional │ leverage    │ entry   │ liquidation │ address                                      │├─────────┼─────────┼──────────┼─────────────┼─────────┼─────────────┼──────────────────────────────────────────────┤│ 0       │ 'short' │ 17655816 │ '20x cross' │ 346.157 │ 480.6       │ '0xf517639a8872e756ac98d3c65507d2ebc25cc032' ││ 1       │ 'long'  │ 14807957 │ '20x cross' │ 348.386 │ 129.72      │ '0x7fdafde5cfb5465924316eced2d3715494c517d1' ││ 2       │ 'long'  │ 10395299 │ '10x cross' │ 352.205 │ 'none'      │ '0x024294c53a69c1e6b39810b3fac87385752fffa1' ││ 3       │ 'short' │ 10366784 │ '20x cross' │ 346.653 │ 526.46      │ '0xb1ec7febea4f841d525785955b7fe0e812d6e86a' ││ 4       │ 'long'  │ 9538985  │ '5x cross'  │ 352.665 │ 'none'      │ '0xfc667adba8d4837586078f4fdcdc29804337ca06' │└─────────┴─────────┴──────────┴─────────────┴─────────┴─────────────┴──────────────────────────────────────────────┘xyz:AAPL positions over $10,000 closest to liquidation (mark 357.40)┌─────────┬─────────┬──────────┬────────────────┬─────────┬─────────────┬──────────────────────────────────────────────┬─────────┐│ (index) │ side    │ notional │ leverage       │ entry   │ liquidation │ address                                      │ away    │├─────────┼─────────┼──────────┼────────────────┼─────────┼─────────────┼──────────────────────────────────────────────┼─────────┤│ 0       │ 'short' │ 11920    │ '20x cross'    │ 348.967 │ 361.22      │ '0xfdef05c5662f5a2598ba48c4cf1be5881a447cf7' │ '1.07%' ││ 1       │ 'short' │ 35740    │ '20x cross'    │ 348.746 │ 361.89      │ '0x23093122b1758bcebdbd4025435f93eee8e0ff7a' │ '1.26%' ││ 2       │ 'short' │ 89522    │ '20x cross'    │ 345.269 │ 362.09      │ '0x26a9cbfe349659bdbb258e2de70f81703f7bf318' │ '1.31%' ││ 3       │ 'short' │ 500526   │ '20x isolated' │ 347.814 │ 362.52      │ '0x878ca64a4c0cf12903ffeb8e517f0c35279c8939' │ '1.43%' ││ 4       │ 'short' │ 107220   │ '20x isolated' │ 354.913 │ 363.07      │ '0x7b46d7430fa7f53599f355f40a336b55a8e42628' │ '1.59%' │└─────────┴─────────┴──────────┴────────────────┴─────────┴─────────────┴──────────────────────────────────────────────┴─────────┘

The largest position on xyz:AAPL was a $17.7 million short at 20x cross margin, liquidated at 480.60. A cross-margin position draws on the whole account, so its liquidation price depends on the account's other positions as well. To follow particular wallets over time rather than one snapshot, the Hyperliquid whale tracker ranks traders and shows each wallet's positions and history.

Step 5: Measure long/short positioning per market

Every long is matched by a short of the same notional, so a long/short ratio by notional is always 1. The useful ratios count the positions on each side, or compare only the large ones. Save this as positioning.mjs and run node positioning.mjs xyz:AAPL xyz:CL:

const LARGE_USD = 100_000; // a "large" position const { snapshotId, markets } = await perpSnapshots(process.argv.slice(2)); const sum = (ps) => ps.reduce((total, p) => total + p.notionalSize, 0);const ratio = (a, b) => Number((a / b).toFixed(2)); const rows = [...markets].map(([market, positions]) => {  const mark = markPrice(positions);  const longs = positions.filter((p) => p.size > 0);  const shorts = positions.filter((p) => p.size < 0);  const large = (ps) => ps.filter((p) => p.notionalSize >= LARGE_USD);  const nearLiquidation = positions.filter(    (p) => p.liquidationPrice !== null && Math.abs(p.liquidationPrice / mark - 1) < 0.05  );  return {    market,    positions: positions.length,    "open interest": Math.round(sum(longs)),    "long/short (count)": ratio(longs.length, shorts.length),    "long/short (large, USD)": ratio(sum(large(longs)), sum(large(shorts))),    "within 5% of liq.": Math.round(sum(nearLiquidation)),  };}); console.log(`snapshot ${snapshotId}`);console.table(rows.sort((a, b) => b["open interest"] - a["open interest"]));

On the recorded snapshot:

snapshot 20261130_state_1240360000┌─────────┬────────────┬───────────┬───────────────┬────────────────────┬─────────────────────────┬───────────────────┐│ (index) │ market     │ positions │ open interest │ long/short (count) │ long/short (large, USD) │ within 5% of liq. │├─────────┼────────────┼───────────┼───────────────┼────────────────────┼─────────────────────────┼───────────────────┤│ 0       │ 'xyz:AAPL' │ 1928      │ 67370494      │ 1.49               │ 1.02                    │ 2242585           ││ 1       │ 'xyz:CL'   │ 2149      │ 67293178      │ 2.33               │ 0.94                    │ 2425753           │└─────────┴────────────┴───────────┴───────────────┴────────────────────┴─────────────────────────┴───────────────────┘

On xyz:CL, a crude oil perp, there were 2.33 long positions for every short one, yet positions of $100,000 or more held slightly more short notional than long (0.94).

Step 6: See what changed between two snapshots

Each snapshot is complete, so comparing two shows every position that opened, closed, flipped side or changed size in between. The script below lists those over $5,000. It loads the current snapshot, polls perpSnapshotTimestamp every 10 seconds until a new one is out, loads that, and compares the two. Save it as changes.mjs:

const market = process.argv[2] ?? "BTC";const MIN_USD = 5_000;const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); const byAddress = (positions) => new Map(positions.map((p) => [p.address, p]));const before = await perpSnapshots([market]);while ((await latestSnapshotId()) === before.snapshotId) await sleep(10_000);const after = await perpSnapshots([market]); const old = byAddress(before.markets.get(market) ?? []);const now = byAddress(after.markets.get(market) ?? []);const changes = [];for (const address of new Set([...old.keys(), ...now.keys()])) {  const a = old.get(address);  const b = now.get(address);  if (Math.max(a?.notionalSize ?? 0, b?.notionalSize ?? 0) < MIN_USD) continue;  let change = null;  if (!a) change = "opened";  else if (!b) change = "closed";  else if (a.size > 0 !== b.size > 0) change = "flipped";  else if (Math.abs(b.size / a.size - 1) > 0.25) change = "resized";  if (change) changes.push({ change, address, before: a?.size ?? 0, after: b?.size ?? 0 });} console.log(`${market}: ${before.snapshotId} -> ${after.snapshotId}`);console.table(changes.sort((x, y) => x.change.localeCompare(y.change) || x.address.localeCompare(y.address)));

Its import line is import { latestSnapshotId, perpSnapshots } from "./perp-snapshots.mjs";. It makes two perpSnapshots calls, well inside the limit of 5 per 10 minutes. Run node changes.mjs XMR. Over the 12 minutes between the two recorded snapshots, on a quiet Sunday, four XMR positions over $5,000 changed:

XMR: 20261130_state_1240360000 -> 20261130_state_1240370000┌─────────┬───────────┬──────────────────────────────────────────────┬─────────┬─────────┐│ (index) │ change    │ address                                      │ before  │ after   │├─────────┼───────────┼──────────────────────────────────────────────┼─────────┼─────────┤│ 0       │ 'flipped' │ '0x15094c3ec74e8a43c082042815e0c135deebb152' │ -0.375  │ 13.477  ││ 1       │ 'opened'  │ '0x17185a1cf66a7826c0c858ced2690acbd8d80d5c' │ 0       │ -23.296 ││ 2       │ 'resized' │ '0x7019197d2b2ae7b44eee12a76015eb1fe94abd36' │ -11.953 │ -24.816 ││ 3       │ 'resized' │ '0xacdd7f82fd113905f0549c5013be52fa1baef6b3' │ 58.342  │ 84.588  │└─────────┴───────────┴──────────────────────────────────────────────┴─────────┴─────────┘

The sizes are in XMR. One trader went from a small short to a long of 13.477 XMR, one opened a short of 23.296 XMR, one doubled a short and one added about half to a long. A position that closed may have been closed by its owner or liquidated: the snapshot can't tell the two apart. To see each liquidation as it happens, subscribe to the liquidationFills channel of the GoldRush Hyperliquid WebSocket API.

Errors and limits

A request with an invalid selector fails before any data is read, and isn't billed or counted against the rate limit. This is the recorded response to "market_names": ["ALL:nosuchdex"], an ALL: selector naming a dex that doesn't exist:

{"error":"invalid_body","message":"unknown dex: nosuchdex"}

The scripts above throw it as HTTP 400: {"error":"invalid_body",...}. Without a valid key the response is 401 with this body:

{"error":"unauthorized"}

The other responses to plan for:

  • 429 {"error":"too_many_requests"}: more than 5 perpSnapshots calls in 10 minutes on one key. Wait the number of seconds in the Retry-After header.
  • 503 {"error":"snapshot_stale",...}: the newest snapshot is more than 15 minutes old. GoldRush returns this rather than old positions. Retry after the Retry-After header (60 seconds).
  • 404 {"error":"no_snapshot"}: no snapshot is loaded yet. Retry shortly.

Frequently asked questions

Are these real Hyperliquid positions or estimates?

They are real positions. Each snapshot is computed from the full exchange state a Hyperliquid node writes every 10,000 blocks, using Hyperliquid's margin rules: margin tiers, isolated margin, and for unified and portfolio-margin accounts the collateral they share with spot.

How often does a new snapshot appear?

About every 12 minutes, once every 10,000 HyperCore blocks. Poll perpSnapshotTimestamp to see when the snapshot_id changes. GoldRush never serves a snapshot more than 15 minutes old.

How much does perpSnapshots cost?

perpSnapshots costs 250 per call, however many markets it returns, and is limited to 5 calls per 10 minutes per API key. perpSnapshotTimestamp costs 0 per call. Errors are not billed.

Does perpSnapshots include HIP-3 markets?

Yes. Ask for one HIP-3 market as "<dex>:<coin>" ("xyz:NVDA"), a whole dex as "ALL:<dex>", or every market on every dex as "ALL:ALL_DEXES". The recorded snapshot had open positions on the native dex and on four HIP-3 dexes: io, mkts, para and xyz.

Can I get JSON instead of MessagePack?

Yes, for up to 5 markets per call: add "format": "json" to the request. Use the default binary format for whole dexes or the whole exchange.

Can I get past snapshots?

No. perpSnapshots returns the newest snapshot only. To keep history, store each snapshot, or the figures you compute from it, as it arrives, keyed by snapshot_id.

Next steps

Get new guides by email

New tutorials and best practices for building with blockchain data, sent as they're published.