# Crypto Open Interest API
> Live open-interest history and trend for crypto perpetual futures, served from the Bybit v5 feed. Open interest is the total value of outstanding contracts — its trend, rising or falling alongside price, is the signal traders use to confirm a move or spot a squeeze. For any USDT perpetual this returns the latest open interest in contracts and in USD, how it has changed over your chosen window, the rising / falling / flat trend, and the full time-series across 5m, 15m, 30m, 1h, 4h and 1d buckets. Look a contract up by symbol (BTCUSDT) or base coin (BTC), pull its open-interest history, or list every tradable perpetual. Live data, no cache. Distinct from a funding-rate API (which carries the rate snapshot) and from price / ticker APIs — this is the open-interest time-series and trend layer.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/openinterest-api/..."
```

## Pricing
- **Free** (Free) — 5,000 calls/Mo, 5 req/s
- **Starter** ($16/Mo) — 75,000 calls/Mo, 15 req/s
- **Pro** ($42/Mo) — 400,000 calls/Mo, 40 req/s
- **Desk** ($99/Mo) — 2,500,000 calls/Mo, 120 req/s

## Endpoints

### Open Interest

#### `GET /v1/oi` — Latest open interest + change and trend

**Parameters:**
- `symbol` (query, optional, string) — Perpetual contract symbol Example: `BTCUSDT`
- `base` (query, optional, string) — Base coin (resolves to <base>USDT) Example: `BTC`
- `period` (query, optional, string) — Bucket: 5m|15m|30m|1h|4h|1d Example: `1h`
- `lookback` (query, optional, string) — Buckets to compare against (2-200) Example: `24`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/openinterest-api/v1/oi?symbol=BTCUSDT&base=BTC&period=1h&lookback=24"
```

**Response:**
```json
{
    "data": {
        "from": "2026-06-08T03:00:00.000Z",
        "as_of": "2026-06-09T03:00:00.000Z",
        "trend": "rising",
        "period": "1h",
        "symbol": "BTCUSDT",
        "change_pct": 2.71,
        "last_price": 62807.5,
        "open_interest": 54894.318,
        "lookback_buckets": 24,
        "open_interest_ago": 53446.06,
        "open_interest_value_usd": 3437587201.86
    },
    "meta": {
        "timestamp": "2026-06-09T03:02:49.022Z",
        "request_id": "50833bd6-cabb-43f2-ad9f-1bc659c84862"
    },
    "status": "ok",
    "message": "Open interest retrieved successfully",
    "success": true
}
```

### History

#### `GET /v1/history` — Open-interest time-series

**Parameters:**
- `symbol` (query, optional, string) — Perpetual contract symbol Example: `BTCUSDT`
- `base` (query, optional, string) — Base coin (resolves to <base>USDT) Example: `ETH`
- `period` (query, optional, string) — Bucket: 5m|15m|30m|1h|4h|1d Example: `1d`
- `limit` (query, optional, string) — Points to return (1-200) Example: `50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/openinterest-api/v1/history?symbol=BTCUSDT&base=ETH&period=1d&limit=50"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "period": "1d",
        "symbol": "BTCUSDT",
        "history": [
            {
                "timestamp": "2026-04-21T00:00:00.000Z",
                "open_interest": 51149.732
            },
            {
                "timestamp": "2026-04-22T00:00:00.000Z",
                "open_interest": 50152.433
            },
            {
                "timestamp": "2026-04-23T00:00:00.000Z",
                "open_interest": 57150.536
            },
            {
                "timestamp": "2026-04-24T00:00:00.000Z",
                "open_interest": 51873.462
            },
            {
                "timestamp": "2026-04-25T00:00:00.000Z",
                "open_interest": 49158.805
            },
            {
                "timestamp": "2026-04-26T00:00:00.000Z",
                "open_interest": 49411.464
            },
            {
                "timestamp": "2026-04-27T00:00:00.000Z",
                "open_interest": 48218.45
            },
            {
                "timestamp": "2026-04-28T00:00:00.000Z",
                "open_interest": 51963.968
            },
            {
                "timestamp": "2026-04-29T00:00:00.000Z",
                "open_interest": 50997.33
            },
            {
                "timestamp": "2026-04-30T00:00:00.000Z",
                "open_interest": 49815.733
            },
            {
                "timestamp": "2026-05-01T00:00:00.000Z",
                "open_interest
…(truncated, see openapi.json for full schema)
```

### Symbols

#### `GET /v1/symbols` — List tradable perpetual symbols

**Parameters:**
- `q` (query, optional, string) — Filter substring Example: `PEPE`
- `limit` (query, optional, string) — Max results (1-2000) Example: `100`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/openinterest-api/v1/symbols?q=PEPE&limit=100"
```

**Response:**
```json
{
    "data": {
        "count": 1,
        "total": 1,
        "symbols": [
            "1000PEPEUSDT"
        ]
    },
    "meta": {
        "timestamp": "2026-06-09T03:02:50.387Z",
        "request_id": "0549728b-e0f9-4e41-be57-05786d76a6d2"
    },
    "status": "ok",
    "message": "Symbols retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Service metadata

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/openinterest-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "source": "Bybit v5 open-interest + tickers (live)",
        "periods": [
            "5m",
            "15m",
            "30m",
            "1h",
            "4h",
            "1d"
        ],
        "service": "openinterest-api",
        "endpoints": {
            "GET /v1/oi": "Latest open interest + change/trend (symbol=BTCUSDT or base=BTC, period=5m|15m|30m|1h|4h|1d, lookback).",
            "GET /v1/meta": "This document.",
            "GET /v1/history": "Open-interest time-series (symbol, period, limit up to 200).",
            "GET /v1/symbols": "List tradable perpetual symbols (q= filter, limit)."
        },
        "description": "Live crypto open-interest history and trend from Bybit v5 (USDT perpetuals): latest open interest in contracts and USD, change over a window, rising/falling trend, and the full time-series across 5m–1d buckets. Look up by symbol or base coin, pull history, or list symbols. Live, no key. Distinct from funding-rate (a snapshot) and price APIs — this is the open-interest trend.",
        "symbols_live": 582
    },
    "meta": {
        "timestamp": "2026-06-09T03:02:50.963Z",
        "request_id": "7cf3daff-8487-497a-ab17-bf151110d134"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/openinterest-api
OpenAPI spec: https://www.oanor.com/api/openinterest-api/openapi.json
