> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hyperdash.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Which big positions are close to liquidation?

> Find the positions closest to liquidation and the prices where liquidations cluster.

> AI agents: read [https://docs.hyperdash.com/skills/data](https://docs.hyperdash.com/skills/data) before using this API. Endpoint index: [https://data.hyperdash.com/llms.txt](https://data.hyperdash.com/llms.txt). Never ask the user to paste an API key into the chat.

**What you get:** every position over 1M USD within 2% of its liquidation price, a map of the BTC liquidation clusters within 10% above and below the price, and the last 24 hours of liquidations by market, longs and shorts.

![Bar chart of BTC liquidation notional per 500 USD price bucket within 10% of the mark price: long liquidations in red below the price, short liquidations in green above it.](https://mintcdn.com/hd-ebefeca3/sc_V11qf70fJnV3w/images/data-api/recipes/liquidation-levels.png?fit=max\&auto=format\&n=sc_V11qf70fJnV3w\&q=85\&s=e3261675e2c8ea1beabc44f233dba2d8)

> [!TIP]
>
> **Ask your agent:** paste this prompt into an AI chat connected to the [MCP server](https://docs.hyperdash.com/data-api/mcp.md), or into a command-line coding agent such as Claude Code or Codex, with your [API key](https://docs.hyperdash.com/data-api/authentication.md) exported.
>
> ```text theme={null}
> Which Hyperliquid positions over 1 million USD are within 2% of liquidation right now? Then map the largest BTC liquidation clusters within 10% above and below the current price, and list what was liquidated in the last 24 hours by market, longs against shorts.
> ```
>
> **Optional:** add this line to get the results as an interactive dashboard.
>
> ```text theme={null}
> Build it as an interactive dashboard in a local HTML file and open it in my browser.
> ```

## API calls

Set your key first:

```bash theme={null}
export HYPERDASH_API_KEY="hdk_sk_..."
```

**1. List positions close to liquidation**

Positions worth at least 1M USD within 2% of their liquidation price, closest first, measured from the live mark price.

```bash theme={null}
curl "https://data.hyperdash.com/v1/positions/near-liquidation?max_distance_pct=2&min_notional=1000000" \
  -H "Authorization: Bearer $HYPERDASH_API_KEY"
```

**2. Map the liquidation levels**

Projected liquidation notional at each price, longs and shorts. `meta.mark` is the price the ladder was computed at.

```bash theme={null}
curl "https://data.hyperdash.com/v1/markets/BTC/liquidation-levels" \
  -H "Authorization: Bearer $HYPERDASH_API_KEY"
```

**3. Find the largest positions at risk**

The largest BTC positions at the latest hourly snapshot, each with its liquidation price.

```bash theme={null}
curl "https://data.hyperdash.com/v1/markets/BTC/liquidation-levels/top?limit=20" \
  -H "Authorization: Bearer $HYPERDASH_API_KEY"
```

**4. Total the last 24 hours by market**

Liquidations per market, longs and shorts, with the largest liquidation. The first line sets `FROM` to 24 hours ago, in Unix milliseconds.

```bash theme={null}
export FROM=$(( ($(date +%s) - 86400) * 1000 ))
curl "https://data.hyperdash.com/v1/liquidations/by-market?start_time=$FROM" \
  -H "Authorization: Bearer $HYPERDASH_API_KEY"
```

> [card] [View more recipes](https://docs.hyperdash.com/data-api/recipes.md)

## Learn more

> [card] [Hyperdash Data API](https://hyperdash.com/products/data/api)
>
> Hyperliquid market and account data over REST and streams.

> [card] [Read a liquidation heatmap](https://hyperdash.com/learn/how-to-read-a-liquidation-heatmap)
>
> Spot where leveraged positions get liquidated.

> [card] [Auto-deleveraging explained](https://hyperdash.com/learn/what-is-auto-deleveraging-adl-and-how-does-it-affect-your-trades)
>
> How ADL can affect your positions.

> [card] [Query data from Claude](https://hyperdash.com/learn/hyperliquid-mcp-server-claude-chatgpt)
>
> Ask Claude or ChatGPT about Hyperliquid data.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.