# Femtos | Liquidation heatmap stream | API reference

> The GET /v1/hypercore/liquidation-heatmap answer of one perp over its default window ending now, pushed on subscribe, then on each roll of the live positions (every 5 s) when it changes (whole, or as a JSON Patch). WebSocket channel hc.liquidations.heatmap on HyperCore: parameters, response fields and a live call per layer.

- Base URL: `https://api.femtos.xyz/v1` (REST) · `wss://api.femtos.xyz/v1/ws` (WebSocket) · MCP: `https://api.femtos.xyz/mcp`
- Auth: `Authorization: Bearer $FEMTOS_KEY`. Free key: https://dashboard.femtos.xyz/signup (browser), or with
  no browser: `GET https://femtos.xyz/accounts/agent/challenge`, solve its proof of work, then `POST https://femtos.xyz/accounts/agent/signup`
  (https://femtos.xyz/agents.md#agent-onboarding)
- Decimals are exact strings, times Unix milliseconds, addresses lowercase `0x`
- Whole API in one file: https://femtos.xyz/agents.md · OpenAPI: https://api.femtos.xyz/v1/openapi.json · Index: https://femtos.xyz/llms.txt
- Page with live calls: https://femtos.xyz/reference/ws/liquidations-heatmap

WebSocket: get a ticket (`POST https://api.femtos.xyz/v1/ws-ticket` with your key), connect to `wss://api.femtos.xyz/v1/ws?ticket=$TICKET`, send the frame below; the first message has `"snapshot": true`. Details: https://femtos.xyz/agents.md#websocket

## Liquidation heatmap stream — WS `hc.liquidations.heatmap`

The GET /v1/hypercore/liquidation-heatmap answer of one perp over its default window ending now, pushed on subscribe, then on each roll of the live positions (every 5 s) when it changes (whole, or as a JSON Patch).

Layers: HyperCore. Not on Elysium: a channel of HyperCore only.
Page with live calls: https://femtos.xyz/reference/ws/liquidations-heatmap?layer=hypercore

| Param | In | Example or values | Meaning |
|---|---|---|---|
| `coin` | filter | `BTC` | Perp coin |
| `interval` | filter | `(empty)`, `snapshot`, `1h`, `4h`, `1d` | snapshot, 1h, 4h, 1d (default 1h): one column per node state, hour, 4 hours or day |
| `buckets` | filter | `40` | Most price buckets, default 100; not with step (1..200) |
| `step` | filter | (optional) | Bucket width in price units, instead of buckets (at most 1000 buckets; a multiple of the 4th significant digit of the grid's top price) |
| `px_lo` | filter | (optional) | Grid low price, with px_hi and step: the grid spans [px_lo, px_hi) instead of the window's prices ± range_pct |
| `px_hi` | filter | (optional) | Grid high price (exclusive), with px_lo and step |
| `range_pct` | filter | (optional) | Grid margin around the window's prices, percent, (0, 50] (default 10); unused with px_lo / px_hi |

```json
{"op":"subscribe","channel":"hc.liquidations.heatmap","filter":{"coin":"BTC","interval":"4h","buckets":"40"}}
```

| Field | Type | Meaning |
|---|---|---|
| `snapshot: true` | object | the full GET /v1/hypercore/liquidation-heatmap answer: the first frame, and any frame sent whole |
| `patch: true` | JsonPatch | with "patch": true on subscribe: the operations, in order, that turn the previous answer into this one |
| `billing` | premium | the snapshot a subscribe asks for counts as GET /v1/hypercore/liquidation-heatmap (premium); every other frame by its bytes (1 credit per 48 KiB) |

## Related (Price-level maps)

- [Liquidation price map](https://femtos.xyz/reference/liquidation-map.md) `GET /v1/hypercore/liquidation-map`: Liquidation prices of every open position, from Hyperliquid's formula on each account's state, bucketed like the stop map. (HyperCore)
- [Liquidation map stream](https://femtos.xyz/reference/ws/liquidations-map.md) `WS hc.liquidations.map`: The GET /v1/hypercore/liquidation-map map, pushed on subscribe, then on each roll of the live positions (every 5 s) when it changes (whole, or as a JSON Patch). (HyperCore)
- [Liquidation heatmap](https://femtos.xyz/reference/liquidation-heatmap.md) `GET /v1/hypercore/liquidation-heatmap`: Liquidation prices of every open position over time: one column per node state, hour, 4 hours or day, one row per price bucket. (HyperCore)
- [Liquidation heatmap cell](https://femtos.xyz/reference/liquidation-heatmap-positions.md) `GET /v1/hypercore/liquidation-heatmap/positions`: The wallets behind one cell of the liquidation heatmap: positions liquidated in a bucket at a column's node state, or now. (HyperCore)
- [Forced flow](https://femtos.xyz/reference/forced-flow.md) `GET /v1/hypercore/forced-flow`: Stop-loss / take-profit orders and liquidations on the same buckets: the cascade (stops + liquidations, with the move) and the take-profits (against it) at each price. (HyperCore)
- [Forced flow stream](https://femtos.xyz/reference/ws/forced-flow.md) `WS hc.forced_flow.map`: The GET /v1/hypercore/forced-flow map, pushed on subscribe, then on each roll of the live positions (every 5 s) when it changes (whole, or as a JSON Patch). (HyperCore)
- [Price level](https://femtos.xyz/reference/price-level.md) `GET /v1/hypercore/price-level`: The orders and positions inside one bucket of the maps: each stop / take-profit with its wallet and position, each position liquidated there. (HyperCore)
- [Stop map stream](https://femtos.xyz/reference/ws/stops-map.md) `WS hc.stops.map`: The GET /v1/hypercore/stops map, pushed on subscribe, then on each roll of the live positions (every 5 s) when it changes (whole, or as a JSON Patch). (HyperCore)

Every page: https://femtos.xyz/reference.md
