> ## 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 family-specific price and outcome-side fields plus decimal-safe field notes for backtests.

Open interest is the outstanding contract size in a market, returned with that venue's price and identity fields. Pull the current snapshot or its history on Hyperliquid core, HIP-3, HIP-4, Lighter, and Lighter on Robinhood Chain; Spot has no open interest. HIP-4 reports open interest per outcome side, and each symbol's window is on [Venue coverage](/venue-coverage).

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

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

    `/v1/rh-lighter/openinterest/{symbol}` and `/current`, for perpetual markets, with history from 2026-08-22. Find symbols on `/v1/rh-lighter/instruments`.
  </Tab>
</Tabs>

## Request parameters

| Parameter | Description |
| - | - |
| `symbol` | Path, required, string. Trading pair symbol, e.g. `BTC` |
| `start` | Query, optional, integer (ms) or string. Start time, Unix ms or RFC 3339. Defaults to 24h ago |
| `end` | Query, optional, integer (ms) or string. End time, Unix ms or RFC 3339. Defaults to now |
| `interval` | Query, optional, string. Aggregation interval: `1m`, `5m`, `15m`, `30m`, `1h`, `4h`, or `1d`. When omitted, the route returns raw source updates at the family-specific cadence. |
| `limit` | Query, optional, integer. Max results. Default 100, maximum 1000. |
| `cursor` | Query, optional, integer. Pagination cursor from `meta.next_cursor`; pass the returned value unchanged. |

## Example response

```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": "12345678-1234-4123-8123-123456789012" }
}
```

## Response fields

| Field | 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; on HIP-4 this is an implied probability, not a liquidation mark |
| `oracle_price` | String. Oracle price when that family supplies one; not applicable to HIP-4 outcome-side OI |
| `mid_price` | String or null. Current mid price when available; may be omitted when unavailable |
| `outcome_id` | Integer. HIP-4 outcome identifier; omitted for the other families |
| `side` | Integer. HIP-4 outcome side; omitted for the other families |
| `day_ntl_volume` | String. 24-hour notional volume (Hyperliquid core only) |
| `prev_day_price` | String. Price 24 hours ago (Hyperliquid core only) |
| `impact_bid_price` | String. Impact bid price used for liquidations (Hyperliquid core only) |
| `impact_ask_price` | String. Impact ask price used for liquidations (Hyperliquid core only) |

Numeric market values are decimal strings. Where a family returns all three, `mark_price`, `oracle_price`, and `mid_price` are distinct: mark drives PnL and liquidations, oracle is the funding and liquidation reference, and mid is the book midpoint when present. Do not manufacture a missing oracle field for HIP-4.

`day_ntl_volume`, `prev_day_price`, `impact_bid_price`, and `impact_ask_price` appear on Hyperliquid core only. HIP-3 rows carry `symbol`, `timestamp`, `open_interest`, `mark_price`, and `oracle_price`; `mid_price` is conditional and may be omitted when unavailable. HIP-4 rows carry `outcome_id`, `side`, `mark_price`, `mid_price`, and outcome-side `open_interest`, with no `oracle_price`. Lighter rows omit `mid_price`. Model each family's fields separately rather than assuming one family's fields are present on every family. For a price series over the same window, use [Candles](/rest-api/candles).

## Access

Each venue's start date, WebSocket channels, and page limit come from [`GET /v1/capabilities`](/capabilities), followed by the SDK, CLI, and MCP names for the same data. The start date is the first served row on that venue; exact starts vary by market, so check `/v1/symbols` for a single symbol. Send `0xArchive-Version: 2026-10-01` for the current response contract; see [API conventions](/conventions).

| Venue | Availability |
| - | - |
| Hyperliquid | From 2023-05-20 02:50 UTC<br />WebSocket `open_interest`: live and replay<br />Up to 1,000 rows a page |
| HIP-3 | From 2026-02-16 17:03 UTC<br />WebSocket `hip3_open_interest`: live and replay<br />Up to 1,000 rows a page |
| HIP-4 | From 2026-05-02 16:51 UTC<br />WebSocket `hip4_open_interest`: replay only<br />Up to 1,000 rows a page<br />WebSocket replay only: the live channel accepts a subscription but does not stream yet. |
| Lighter | From 2025-08-25 15:28 UTC<br />WebSocket `lighter_open_interest`: live and replay<br />Up to 1,000 rows a page |
| Lighter on Robinhood Chain | From 2026-08-22 18:43 UTC<br />WebSocket `rh_lighter_open_interest`: live and replay<br />Up to 1,000 rows a page |

| Surface | Names |
| - | - |
| Python SDK | `client.hyperliquid.open_interest.history(symbol, ...)`, `.open_interest.current(symbol)` |
| TypeScript SDK | `client.hyperliquid.openInterest.history(symbol, ...)`, `.openInterest.current(symbol)` |
| Rust SDK | `client.hyperliquid.open_interest.history`, `.open_interest.current` |
| CLI | `oxa oi history`, `oxa oi current`; HIP-4 `oxa hip4 oi history\|current` |
| MCP tools | `get_open_interest`, `get_open_interest_history`, `get_hip3_open_interest`, `get_hip3_open_interest_history`, `get_hip4_open_interest`, `get_hip4_open_interest_current`, `get_lighter_open_interest`, `get_lighter_open_interest_history`, `get_rh_lighter_open_interest`, `get_rh_lighter_open_interest_history` |

## Stream or replay it

Open interest streams live on Hyperliquid core (`open_interest`), HIP-3 (`hip3_open_interest`), HIP-4 (`hip4_open_interest`), Lighter (`lighter_open_interest`), and Lighter on Robinhood Chain (`rh_lighter_open_interest`), and each channel also supports timed replay. The live Lighter message carries open interest inside a market-context object that also includes funding and prices; see [Lighter WebSocket channels](/websocket/lighter). Lighter current open interest is also available through REST, and `lighter_open_interest` supports historical WebSocket replay. Historical data is also available through REST and exports. 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 (`$0.50/GB`, `$2.50 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 step

For the funding rate on the same markets, continue to [Funding](/rest-api/funding).


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