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

# Open interest

> Open-interest snapshots and history by venue family, with mark, oracle, and mid prices and decimal-safe field notes for backtests.

Open interest is the total size of outstanding contracts, plus the mark, oracle, and mid prices that move with it. Hyperliquid core, HIP-3, HIP-4, and Lighter serve open interest; Spot does not.

## Get open interest

<Tabs>
  <Tab title="Hyperliquid">
    ```bash theme={"theme":"github-dark"}
    curl "https://api.0xarchive.io/v1/hyperliquid/openinterest/BTC/current" \
      -H "X-API-Key: $OXARCHIVE_API_KEY"
    ```

    `/current` is the snapshot; `/v1/hyperliquid/openinterest/{symbol}` paginates history.
  </Tab>

  <Tab title="HIP-3">
    ```bash theme={"theme":"github-dark"}
    curl "https://api.0xarchive.io/v1/hyperliquid/hip3/openinterest/km:US500/current" \
      -H "X-API-Key: $OXARCHIVE_API_KEY"
    ```

    `/v1/hyperliquid/hip3/openinterest/{symbol}` and `/current`. Namespaced builder symbols, case-sensitive.
  </Tab>

  <Tab title="HIP-4">
    ```bash theme={"theme":"github-dark"}
    curl "https://api.0xarchive.io/v1/hyperliquid/hip4/openinterest/%230/current" \
      -H "X-API-Key: $OXARCHIVE_API_KEY"
    ```

    `/v1/hyperliquid/hip4/openinterest/{symbol}` and `/current`. Outcome side ids such as `%230`.
  </Tab>

  <Tab title="Lighter">
    ```bash theme={"theme":"github-dark"}
    curl "https://api.0xarchive.io/v1/lighter/openinterest/{symbol}/current" \
      -H "X-API-Key: $OXARCHIVE_API_KEY"
    ```

    `/v1/lighter/openinterest/{symbol}` and `/current`. Find symbols on `/v1/lighter/instruments`.
  </Tab>
</Tabs>

## Request parameters

| Parameter  | In    | Type         | Required | Description                                           |
| ---------- | ----- | ------------ | -------- | ----------------------------------------------------- |
| `symbol`   | path  | string       | Yes      | Trading pair symbol, e.g. `BTC`                       |
| `start`    | query | integer (ms) | No       | Start time, Unix ms. Defaults to 24h ago              |
| `end`      | query | integer (ms) | No       | End time, Unix ms. Defaults to now                    |
| `interval` | query | string       | No       | Aggregation interval; omit for raw \~1 min resolution |
| `limit`    | query | integer      | No       | Max results. Default 100, max 1000                    |
| `cursor`   | query | integer      | No       | Pagination cursor                                     |

```json theme={"theme":"github-dark"}
{
  "success": true,
  "data": {
    "coin": "BTC", "symbol": "BTC", "timestamp": "2026-06-05T16:44:24.247Z",
    "open_interest": "33091.28243", "mark_price": "60803", "oracle_price": "60830", "mid_price": "60785.5",
    "day_ntl_volume": "6499523469.57", "prev_day_price": "63741", "impact_bid_price": "60781", "impact_ask_price": "60790"
  },
  "meta": { "request_id": "req_5c2e9a14f7b03d68" }
}
```

## Response fields

| Field              | Type   | Description                                        |
| ------------------ | ------ | -------------------------------------------------- |
| `symbol`           | string | Trading pair symbol (`coin` is a deprecated alias) |
| `timestamp`        | string | Snapshot time (UTC)                                |
| `open_interest`    | string | Total open interest in contracts                   |
| `mark_price`       | string | Mark price (drives PnL and liquidations)           |
| `oracle_price`     | string | Oracle price from the external feed                |
| `mid_price`        | string | Current mid price                                  |
| `day_ntl_volume`   | string | 24-hour notional volume                            |
| `prev_day_price`   | string | Price 24 hours ago                                 |
| `impact_bid_price` | string | Impact bid price used for liquidations             |
| `impact_ask_price` | string | Impact ask price used for liquidations             |

All values are decimal strings. `mark_price`, `oracle_price`, and `mid_price` are three distinct prices: mark drives PnL and liquidations, oracle is the funding and liquidation reference, mid is the book midpoint.

## Stream it live

Open interest streams on Hyperliquid core (`open_interest`), HIP-4 (`hip4_open_interest`), and Lighter (`lighter_open_interest`). HIP-3 open interest is REST-only, and Spot has no open interest.

```javascript theme={"theme":"github-dark"}
ws.send(JSON.stringify({ op: "subscribe", channel: "open_interest", symbol: "BTC" }));
```

Connection and reconnect handling live in the [WebSocket](/websocket) tab; see [WebSocket channels](/websocket/channels) for the family matrix.

## Export in bulk

For an open-interest history as files, use the `oi` export schema (`$1/GB`, `$5 minimum`), delivered as Parquet with ZSTD compression. Build a selection in the [Data catalog](/data-catalog); columns and coverage keys are on [Export schemas](/export-schemas).

## Next

Use [Funding](/rest-api/funding) for the funding rate, [Candles](/rest-api/candles) for price series, or [Order books](/rest-api/order-books) for live depth.
