Papertrade Liquidations Docs GitHub

#API reference

Base URL: https://papertrade-liquidations.pages.dev. CORS is open (access-control-allow-origin: *). The machine-readable description is /openapi.json (OpenAPI 3.1).

#GET /api/heatmap

Liquidation map for one market.

ParameterTypeDefaultNotes
marketBTC or ETHBTC
bucketnumberautomaticBucket size in dollars, 0.0001 to 1,000,000.
walletsinteger40Largest open-notional wallets to follow, 1 to 44 (the Cloudflare free plan limit; 100 on a paid plan).
cascadenumbernonePercent move for the cascade figure, 0 to 25.

Unknown parameters return 400, so typos fail loudly.

curl -s "https://papertrade-liquidations.pages.dev/api/heatmap?market=ETH&bucket=2&cascade=1"

#Response

FieldMeaning
markPriceHyperliquid mid in dollars.
asOfMsServer time of the build, Unix milliseconds.
bucketUsdBucket size used.
coveragewallets, positions, trackedNotionalUsd, protocolNotionalUsd and fraction (tracked divided by protocol, 0 to 1, null if unavailable).
totalsLong and short notional and counts among tracked positions.
bucketsOccupied buckets, ascending: lo, hi, mid, longNotional, shortNotional, longCount, shortCount.
cascadeWhen cascade was given: down (longs that bust) and up (shorts that bust) with notional, margin, count.
nearestThe ten positions closest to bust: wallet, position id, side, leverage, margin, notional, entry, bust, distancePercent, distanceUsd.
protocolThe Papertrade API's protocol-wide map in dollars, with totals below and above the mapped range.
diagnosticspositions, mismatches (bust prices that differ from the API), wallets, failedWallets.
freshnessSnapshot age: refreshed, cached, missing, oldestMs, newestMs.

#Caching and errors

Responses are cached for 10 seconds; the x-cache header is HIT or MISS. Errors use { "ok": false, "error": { "code", "message" } }:

StatusCodeMeaning
400unknown_parameter, invalid_parameterBad input.
502warming_upNo snapshots are cached yet and the stream endpoint is rate limited. Retry in a minute.
502upstream_errorThe Papertrade API or Hyperliquid failed.

#Same-origin proxy

/api/papertrade/* forwards to the Papertrade API because its REST routes send no CORS headers. The web app uses it; it is not a stable public API.

#MCP

The same data is available to agents at POST /mcp. See MCP.

#Upstream data

SourceUsed for
exchange.papertrade.xyz /state/tradingInstruments and bust buffers.
exchange.papertrade.xyz /state/leaderboard/accountsLargest wallets by open notional (page index is 0-based).
exchange.papertrade.xyz /state/user/liveOne wallet's open positions (SSE).
exchange.papertrade.xyz /query/markets/{id}/liquidation-mapProtocol-wide map.
api.hyperliquid.xyz /infoMid prices and candles.

View as markdown

Unofficial. Not affiliated with Papertrade. High leverage can lose your whole margin. Apache-2.0. llms.txt · MCP · openapi.json