{
  "name": "HyperPerps Whale Liquidity API",
  "schema": "hyperperps.whale-heatmap.v4",
  "description": "Market-wide Hyperliquid liquidation, stop-loss, take-profit and positioning map. Positions are recomputed about every 2 minutes (and republished about every 15 seconds with the latest trade price) from every Hyperliquid leaderboard account plus every account seen trading these coins, sub-accounts included. Anonymized — clusters only, no per-wallet rows.",
  "symbols": [
    "BTC",
    "ETH",
    "SOL",
    "HYPE"
  ],
  "endpoints": {
    "discovery": "/api/public/heatmap",
    "per_symbol": "/api/public/heatmap/{symbol}",
    "per_symbol_live": "/api/public/heatmap/{symbol}/live",
    "example": "/api/public/heatmap/BTC",
    "example_near_price": "/api/public/heatmap/BTC?range=5&levels=10"
  },
  "query": {
    "range": "Max distance from spot, in percent (e.g. 25), or \"all\" for every level at any distance. Applies to longs, shorts, stop_clusters and explicit_tp.",
    "levels": "Max levels per side, biggest notional first (e.g. 50), or \"all\".",
    "defaults": "No params = the full ladder: every level at any distance, biggest notional first. Passing one param defaults the other to \"all\". Every level holds at least $10k of notional.",
    "meta": "_meta.view echoes the filter and when the full ladder was built (levels_as_of).",
    "format": "?format=legacy (or ?v=4) returns the pre-2026-11-16 field names: longs / shorts / stop_clusters / explicit_tp instead of liquidations / stop_losses / take_profits."
  },
  "access": {
    "free": "GET /api/public/heatmap/{symbol} — real-time, no key needed, the full ladder by default. 500 calls per day per IP; over that → 429 with Retry-After (next UTC midnight).",
    "live": "GET /api/public/heatmap/{symbol}/live — same real-time data (alias).",
    "pro": "20,000 calls/day, same data. $29.99 = 30 days (pro-rated, stacking): send USDC on Hyperliquid to 0x79ce08822E57aa76EfBc2E3Ae813C055A9D1bdC1 from your key's wallet. Free route: new Hyperliquid accounts that sign up with referral code HYPERPERPSBOT get 7 days, then 7 more per $250,000 of notional volume traded.",
    "keys": "A key is only needed for Pro. Get one without a browser: GET /api/public/account/challenge?wallet=0x… → sign the message (EIP-191 personal_sign) → POST /api/public/account/key {wallet, message, signature}. Send it as Authorization: Bearer <key>. Keys signed by a Hyperliquid API wallet belong to its main account. Portal: https://hyperperps.app/api-access",
    "pay_in_code": "Agents can pay with any Hyperliquid SDK: usdSend USDC to 0x79ce08822E57aa76EfBc2E3Ae813C055A9D1bdC1 from the key's wallet; credited within ~2 minutes.",
    "account": "GET /api/public/account (key) — tier, pro_from, pro_until, today's usage. GET /api/public/account/pro?wallet=0x… — which Pro routes that wallet can use.",
    "limits": "Headers on every call: X-API-Tier, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset; keyed Pro calls also X-Pro-Until.",
    "mcp": "Remote MCP (Streamable HTTP): https://hyperperps.app/mcp — tools get_liquidation_heatmap, get_account, get_pro, api_key_challenge, create_api_key.",
    "browsers": "The heatmap pages on hyperperps.app stay free and live."
  },
  "refresh_seconds": 120,
  "cache_seconds": 10,
  "conventions": {
    "bias_scale": "Directional scalars run -1..+1. Negative = bearish / short lean, positive = bullish / long lean, 0 = balanced.",
    "distance_pct": "Every distance is a signed percent from spot: negative below price, positive above.",
    "nulls": "A null field means no read this cycle (thin data). Check _meta.age_seconds / _meta.stale before trusting any value.",
    "multi_window": "Fields like fresh_money carry per-horizon sub-values (e.g. 1h / 4h / 24h)."
  },
  "cluster_shape": {
    "price": "Price level in USD.",
    "notional_usd": "Total position notional sitting at this level, in USD.",
    "wallet_count": "Distinct accounts at this level.",
    "distance_pct": "Signed percent from spot. Negative = below price, positive = above.",
    "touched_in_last_hour": "True if price traded through this level in the last hour (the pool has likely already fired — treat as spent). Absent when unknown: the trade-price record (touch_coverage_since) is younger than an hour.",
    "touched_at": "Epoch ms when price last traded through this level (within the last hour), or null.",
    "touched_recently": "True if price traded through this level in the last 5 minutes. Absent when unknown (record younger than 5 minutes).",
    "refresh_pending": "True if price reached this level but some of its wallets have not been re-read since; the next update will show what survived.",
    "top_wallet_share": "Liquidation clusters only: the largest single wallet's share of the notional, 0..1."
  },
  "fields": {
    "updated_at": "Epoch-ms timestamp of the poller's last write for this symbol.",
    "spot_at_compute": "Price the snapshot was computed against — every cluster's distance_pct is relative to this.",
    "spot_fetched_at": "Epoch-ms timestamp when the reference price was fetched after the wallet and order sweeps; use this to judge price freshness.",
    "freshness_seconds": "Age of the snapshot in seconds. Check this before trusting the read.",
    "sample_size": "Open positions analyzed this cycle.",
    "field_names": "_meta.field_names: which naming this response uses, with the rename note.",
    "liquidations": "Where positions get force-closed. liquidations.longs = longs' liquidation prices (below price, downside fuel); liquidations.shorts = shorts' (above price, upside fuel).",
    "stop_losses": "Resting stop-loss orders. stop_losses.longs = longs' stops (below price); stop_losses.shorts = shorts' stops (above price).",
    "take_profits": "Resting take-profit orders. take_profits.longs = longs' take-profits (sell orders above price); take_profits.shorts = shorts' take-profits (buy orders below price).",
    "longs": "Legacy name (?format=legacy only) for liquidations.longs. Long-liquidation clusters BELOW price — where longs get force-closed. Downside fuel a sweep runs toward.",
    "shorts": "Legacy name (?format=legacy only) for liquidations.shorts. Short-liquidation clusters ABOVE price — where shorts get force-closed. Upside fuel.",
    "stop_clusters": "Legacy name (?format=legacy only) for stop_losses. Declared stop-loss pools — long_sl_clusters below spot, short_sl_clusters above. Stop-hunt fuel.",
    "explicit_tp": "Legacy name (?format=legacy only) for take_profits. Resting take-profit walls — sell_side above spot, buy_side below. Where moves stall (supply/demand caps).",
    "methodology_version": "Date string naming the poller methodology that produced this payload. Each version, and any known data-quality incident, is listed in the changelog; archived history rows without it map to versions by date.",
    "update_kind": "\"full\" = positions recomputed from fresh wallet reads (about every 2 minutes); \"fast\" = republished between full recomputes (about every 15 seconds) with the latest trade price, touch flags, and walls price has crossed removed.",
    "positions_recomputed_at": "Epoch ms of the last full recompute. updated_at is this publish; the gap is how old the position data is.",
    "touch_coverage_since": "Epoch ms the gap-free trade-price record behind the touch flags starts (resets after a restart or a feed outage). Flags whose window reaches back before it are omitted rather than reported false.",
    "presumed_liquidated": "Positions left out of this publish because price crossed their liquidation price since their last read (or it is already on the wrong side of spot). They return if a fresh read shows they survived.",
    "stop_tp_coverage": "How much of stop_clusters and explicit_tp is fresh. Resting stop-loss/take-profit orders are read for part of the eligible holders each cycle, so these two layers mix fresh and older reads. holders = wallets in this symbol with at least min_position_usd of open positions; read_this_cycle / read_within_30m / read_within_tier / never_read count their order reads (read_within_tier = within the holder's own refresh interval: 5 min for $10k+, 15 min below); pct_within_30m = read_within_30m / holders. Liquidation walls (longs/shorts) come from position reads, which are refreshed separately (see positions_recomputed_at).",
    "net_oi_skew": "Net open-interest lean, -1..+1. Positive = crowd net long.",
    "whale_vs_retail": "Directional lean of the biggest accounts (whale_bias) vs the small-wallet tail (retail_bias), each -1..+1, with notional + counts.",
    "whale_entries": "Where big money built: long/short average entry price + the largest entry-price clusters. Reveals whale cost basis vs spot.",
    "trapped_pct": "Fraction of long/short size sitting >=2/5/10% underwater. Forced-sell/-cover pressure building.",
    "scale_out_pressure": "Measured profit-taking / exit pressure on each side, 0..1.",
    "fresh_money": "Net positioning momentum from newly-opened size over the last 1h / 4h / 24h, each -1..+1.",
    "cascade_mass": "Liquidation notional stacked within 1/2/5% of price on each side — how far a cascade could carry.",
    "forced_liq_proximity": "Fraction of size sitting within 2/5% of its own liquidation price — real cascade fuel vs paper losses.",
    "crowd_leverage": "Aggregate leverage profile of the crowd — higher = more fragile to a sweep."
  },
  "support": {
    "message": "This data is free for you. If it helped your trades, you can give a little back: sign up to Hyperliquid with our link. You get a fee discount, and it keeps this feed alive — no pressure.",
    "referral": "https://app.hyperliquid.xyz/join/HYPERPERPSBOT",
    "donate": {
      "message": "Made a great trade with this? Consider giving back to keep the heatmap free. Donate any amount to 0x79ce08822E57aa76EfBc2E3Ae813C055A9D1bdC1 — a free USDC transfer on Hyperliquid, or any EVM chain (Arbitrum, Base, Ethereum).",
      "address": "0x79ce08822E57aa76EfBc2E3Ae813C055A9D1bdC1",
      "networks": [
        "Hyperliquid",
        "Arbitrum",
        "Base",
        "Ethereum",
        "any EVM chain"
      ]
    }
  }
}
