> ## 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.

# Hyperliquid liquidations live stream

> GET /v1/liquidations/stream pushes Hyperliquid liquidations as they happen over Server-Sent Events, usually a few seconds behind the chain, with market and size filters and resume on reconnect.



## OpenAPI

````yaml GET /v1/liquidations/stream
openapi: 3.1.0
info:
  title: Ironflow API
  version: 1.0.0
  description: >
    Hyperliquid market data from Ironflow's own nodes: tick-level fills and

    trades, candles, funding rates, liquidations, mark prices, open interest,

    markets and wallet analytics over REST. One schema across native HL perps,

    HIP-3 builder markets, HIP-4 outcome contracts and HL spot.


    **Base URL:** `https://api.ironflow.sh`


    **Authentication:** Read endpoints work without a key (keyless access) or

    with a Bearer token in the `Authorization` header. Writes always need a key.

    ```

    Authorization: Bearer if_your_api_key

    ```

    Get a free key at https://ironflow.sh/key.


    **Access levels:**


    | Access | Requests per minute | History | Max range per request |

    |---|---|---|---|

    | No key | 10 per IP | 24 hours | 1 hour |

    | Free key | 60 | 30 days | 6 hours |

    | Explorer | 100 | 90 days | 24 hours |

    | Builder | 1,000 | 1 year | 7 days |

    | Enterprise | 10,000 | full | unlimited |


    Without a market filter, high-volume endpoints allow at most 4 hours per
    request.

    A header that is present but malformed returns 401; keyless access applies
    only

    when no `Authorization` header is sent.


    **Data availability:** fills and trades cover a rolling 12 months; other

    datasets start later (funding 2025-09-27, open interest and mark prices

    2026-04-29).


    **Timestamps:** All timestamps are Unix milliseconds (int64).


    **Pagination:** Paginated endpoints return a `cursor` in
    `pagination.next_cursor`.

    Pass it as the `cursor` query parameter to fetch the next page.

    When `pagination.has_more` is `false`, you have reached the last page.
  contact:
    name: Ironflow Support
    url: https://ironflow.sh
servers:
  - url: https://api.ironflow.sh
    description: Production
security:
  - bearerAuth: []
  - {}
tags:
  - name: Market Data
    description: Historical tick-level market data stored in ClickHouse.
  - name: Analytics
    description: >-
      Aggregated analytics. Net flows and funding stats work without a key; the
      others need a key (a free key works).
  - name: Cohorts
    description: Predefined and custom address groups for filtering market data.
  - name: Info Proxy
    description: >-
      Cached passthrough to the Hyperliquid Info API. No record caps, higher
      rate limits.
  - name: Export
    description: Bulk data export as CSV or Parquet (Builder tier and above).
  - name: Query
    description: >-
      Read-only ClickHouse SQL over curated Hyperliquid tables (hl.*), limited
      by tier.
  - name: System
    description: Health checks and metadata endpoints.
  - name: TradingApp
    description: >-
      Trading app Phase A — wallet auth (SIWE), agent-key provisioning, and
      kill-switch.
paths:
  /v1/liquidations/stream:
    get:
      tags:
        - Market Data
      summary: Stream liquidations live
      description: |
        Server-Sent Events feed of Hyperliquid liquidations as they land,
        usually a few seconds behind the chain (longer while our node
        catches up after a heavy cascade). Each event is one row in the same
        shape as `GET /v1/liquidations`, so you do not need to poll that
        endpoint for new rows.

        Needs an API key (a free key works). Keys can hold a few streams
        at once (free 2, explorer 5, builder 20, enterprise 100); use one
        stream with several markets rather than one per market.

        Wire format: every event has `id: <timestamp>-<sequence>`,
        `event: liquidation` and a JSON `data` line. Comment lines
        (`: ping`) keep the connection open every 15 s. After an hour the
        server sends `event: reconnect` and closes; reconnect with the
        `Last-Event-ID` header (EventSource does this for you) or
        `?last_event_id=` and the rows you missed in the last 5 minutes
        are sent first. A client that falls far behind gets
        `event: error` with code `SLOW_CONSUMER` and should reconnect the
        same way. For older history, page `GET /v1/liquidations`.

        ```bash
        curl -N -H "Authorization: Bearer $IRONFLOW_API_KEY" \
          "https://api.ironflow.sh/v1/liquidations/stream?market=BTC,ETH&min_usd=10000"
        ```
      operationId: streamLiquidations
      parameters:
        - name: market
          in: query
          description: |
            Comma-separated markets to include (`BTC-PERP,flx:GAS-PERP`). A
            bare coin (`BTC`) matches its perp. Up to 50. Omit for every
            market.
          schema:
            type: string
            example: BTC-PERP,ETH-PERP
        - name: address
          in: query
          description: Only liquidations of this wallet.
          schema:
            type: string
            example: '0x0000000000000000000000000000000000000001'
        - name: min_usd
          in: query
          description: Only liquidations of at least this notional (price × size) in USD.
          schema:
            type: number
            minimum: 0
            example: 10000
        - name: last_event_id
          in: query
          description: |
            Resume after this event id (`<timestamp>-<sequence>`), for clients
            that cannot set the `Last-Event-ID` header. Ids older than 5
            minutes are ignored.
          schema:
            type: string
            example: 1718400000000-1
      responses:
        '200':
          description: |
            An open event stream. Each `data` line is a `Liquidation`.
          content:
            text/event-stream:
              schema:
                type: string
              example: >
                retry: 3000

                : connected


                id: 1718400000000-1

                event: liquidation

                data:
                {"source":"hyperliquid","market":"BTC-PERP","issuer":"","base_market":"BTC-PERP","market_type":"perp","timestamp":1718400000000,"block_number":12345678,"address":"0xabc123","side":"sell","price":"67380.00","size":"2.5","account_value":"0.00","leverage_type":"cross","bankrupt":false,"sequence":1}
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          description: |
            No API key. The error code is `KEY_REQUIRED`; the message links
            the free-key page.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: |
            Rate limited, or this key already has its tier's number of open
            streams (code `STREAM_LIMIT`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  responses:
    BadRequest:
      description: Invalid request parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: BAD_REQUEST
              message: address is required
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable error code.
              example: RATE_LIMIT_EXCEEDED
            message:
              type: string
              description: Human-readable error description.
              example: Rate limit exceeded. Retry after 60 seconds.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Ironflow API key, format `if_xxxx`. Free keys at
        https://ironflow.sh/key. Optional on read endpoints.

````

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