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

# Quickstart for wallets and apps

> Show Hyperliquid positions, PnL, history, liquidation levels, prices and live wallet activity to your users with the Ironflow API, plus webhook alerts, warnings before a user is liquidated and caching tips.

This page is for a wallet or app that shows Hyperliquid data to its users. Each section has one request to start from and links to the full reference. Every example sends your key in the `Authorization` header:

```bash theme={null}
export IRONFLOW_API_KEY=if_your_api_key
```

Times in `from` and `to` take Unix milliseconds, ISO 8601 or relative values such as `-7d` ([Timestamps](https://docs.ironflow.sh/concepts/timestamps.md)).

## Show a user's positions, PnL and history

Open positions with entry and mark prices, leverage and unrealized PnL:

```bash theme={null}
curl -H "Authorization: Bearer $IRONFLOW_API_KEY" \
  "https://api.ironflow.sh/v1/analytics/user-state?address=0xabc0000000000000000000000000000000000001"
```

The rest of a wallet screen comes from these:

| What | Endpoint |
| - | - |
| Volume, realized PnL, win rate and markets over a window | [User summary](https://docs.ironflow.sh/api-reference/analytics/user-summary.md) |
| Realized PnL over time, for a chart | [User PnL series](https://docs.ironflow.sh/api-reference/analytics/user-pnl-series.md) |
| Trade history | [List fills](https://docs.ironflow.sh/api-reference/market-data/list-fills.md) |
| Funding paid and received | [User funding](https://docs.ironflow.sh/api-reference/analytics/user-funding.md) |
| Deposits, withdrawals, transfers and other non-fill events | [User ledger](https://docs.ironflow.sh/api-reference/analytics/user-ledger.md) |
| Positions at a past time | [Positions at](https://docs.ironflow.sh/api-reference/analytics/positions-at.md) |

Fills start on 25 May 2025 and funding payments on 27 September 2025. How far back a key reads depends on its plan ([Rate limits](https://docs.ironflow.sh/concepts/rate-limits.md)).

## Liquidation levels and the live liquidation feed

Where open positions in a market would be liquidated, by price:

```bash theme={null}
curl -H "Authorization: Bearer $IRONFLOW_API_KEY" \
  "https://api.ironflow.sh/v1/liquidations/map?market=BTC-PERP"
```

For past liquidations by price level use [Liquidation levels](https://docs.ironflow.sh/api-reference/analytics/liquidation-levels.md), for single rows [List liquidations](https://docs.ironflow.sh/api-reference/market-data/list-liquidations.md), and for a live feed [Stream liquidations](https://docs.ironflow.sh/api-reference/market-data/stream-liquidations.md):

```bash theme={null}
curl -N -H "Authorization: Bearer $IRONFLOW_API_KEY" \
  "https://api.ironflow.sh/v1/liquidations/stream?market=BTC,ETH&min_usd=10000"
```

The [liquidation map](https://docs.ironflow.sh/api-reference/analytics/liquidation-map.md) page explains the levels and the cumulative totals.

## Prices and charts, HIP-3 included

Candles for a chart. HIP-3 markets use their full name, such as `xyz:NVDA-PERP`:

```bash theme={null}
curl -H "Authorization: Bearer $IRONFLOW_API_KEY" \
  "https://api.ironflow.sh/v1/candles?market=xyz:NVDA-PERP&interval=1h&from=-7d"
```

For the latest mark and oracle price of one market, read [Mark prices](https://docs.ironflow.sh/api-reference/market-data/list-mark-prices.md) with `order=desc&limit=1`. For a markets list with mark, 24h change, open interest and funding in one call, use [Markets snapshot](https://docs.ironflow.sh/api-reference/market-data/markets-snapshot.md). [List candles](https://docs.ironflow.sh/api-reference/market-data/list-candles.md) has every interval. [Sources and markets](https://docs.ironflow.sh/concepts/sources-and-markets.md) explains market names.

## Watch your users' wallets live

The wallet stream sends the fills and liquidations of a list of wallets as they happen, so you do not poll each wallet:

```bash theme={null}
curl -N -H "Authorization: Bearer $IRONFLOW_API_KEY" \
  "https://api.ironflow.sh/v1/wallets/stream?addresses=0xabc0000000000000000000000000000000000001,0xabc0000000000000000000000000000000000002"
```

Events are `fill` and `liquidation`. Reconnect with the `Last-Event-ID` header to get what you missed, up to an hour back; `since=15` replays the last 15 minutes on a fresh open. One stream watches 10 wallets on Explorer, 200 on Builder and 1,000 on Pro. See [Stream wallets](https://docs.ironflow.sh/api-reference/market-data/stream-wallets.md).

## Webhook alerts to your backend

Ironflow can post liquidations to your server, so your backend does not hold a stream open. This alert posts every liquidation of one wallet to your webhook:

```bash theme={null}
curl -X POST -H "Authorization: Bearer $IRONFLOW_API_KEY" -H "Content-Type: application/json" \
  "https://api.ironflow.sh/v1/alerts" \
  -d '{"url": "https://example.com/hooks/ironflow", "name": "User liquidations", "address": "0xabc0000000000000000000000000000000000001"}'
```

The response carries `signing_secret` once; verify the `X-Ironflow-Signature` header on each delivery with it. On Pro, the same call with `signal` follows an edge signal instead (Liquidation Pressure, Opening Bell, Flow Ahead). See [Create alert](https://docs.ironflow.sh/api-reference/alerts/create-alert.md) and [Liquidation alerts](https://docs.ironflow.sh/guides/liquidation-alerts.md).

## Warn users before liquidation

A position risk alert tells your backend when one of your users' positions gets close to its liquidation price, so you can notify the user while there is still time to add margin or reduce the position. Send the wallets and how close is too close:

```bash theme={null}
curl -X POST -H "Authorization: Bearer $IRONFLOW_API_KEY" -H "Content-Type: application/json" \
  "https://api.ironflow.sh/v1/alerts" \
  -d '{
    "name": "User liquidation risk",
    "url": "https://example.com/hooks/ironflow",
    "signal": "position_risk",
    "addresses": ["0xabc0000000000000000000000000000000000001", "0xabc0000000000000000000000000000000000002"],
    "threshold_pct": 10
  }'
```

Every minute Ironflow checks each open perp position of those wallets, native and HIP-3, against its liquidation price at the live mark. When a position gets within `threshold_pct` (the distance is |mark - liquidation price| / mark), your webhook gets one `at_risk` event for it. If the wallet is then liquidated, a `liquidated` event follows within seconds.

```json theme={null}
{
  "type": "position_risk",
  "alert_id": "6f1c...",
  "alert_name": "User liquidation risk",
  "sent_at": "2026-11-22T13:02:12Z",
  "events": [
    {
      "id": "at_risk-1795352531000-0xabc0000000000000000000000000000000000001-BTC-PERP",
      "event": "at_risk",
      "wallet": "0xabc0000000000000000000000000000000000001",
      "market": "BTC-PERP",
      "side": "long",
      "size": 1.5,
      "position_usd": 120000,
      "entry_px": 82000,
      "mark_px": 80000,
      "liquidation_px": 76800,
      "distance_pct": 4,
      "threshold_pct": 10,
      "leverage": 20,
      "leverage_type": "cross",
      "time_ms": 1795352531000,
      "time": "2026-11-22T13:02:11Z",
      "source": "snapshot"
    }
  ],
  "more": 0
}
```

A position warns once per crossing: it is armed again only after it moves back out past 1.25 times the threshold (12.5% for a 10% alert), and never more than once every 30 minutes. A closed or flipped position starts fresh. `markets`, `side` and `min_usd` (position value) narrow what is watched.

Explorer watches 10 wallets, Builder 200 and Pro 1,000, counted over all of an account's position risk alerts; for more, write to [hello@ironflow.sh](mailto:hello@ironflow.sh). Deliveries cost no credits. `GET /v1/alerts` shows `wallets_watched` and `wallet_limit`. The [liquidation alerts guide](https://docs.ironflow.sh/guides/liquidation-alerts.md#position-risk-alerts) has the details.

## Caching tips

* Cache market-wide data on your server and serve it to all your users: the markets snapshot, candles, the liquidation map and mark prices are the same for everyone. The liquidation map sends an `ETag`; send it back as `If-None-Match` and an unchanged map answers `304`.
* Call the per-user endpoints (user state, summary, fills) when a user opens the screen that shows them, not on a timer for every user.
* For live updates of many wallets, use one wallet stream instead of polling.

[Rate limits](https://docs.ironflow.sh/concepts/rate-limits.md) lists what each call costs in credits.

## Plans

Showing Ironflow data to your users is commercial use, which needs Builder or Pro. Pro starts at \$499/mo. For higher limits or partner terms, write to [hello@ironflow.sh](mailto:hello@ironflow.sh). See [Plans and payment](https://docs.ironflow.sh/concepts/plans-and-payment.md).


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