# Bybit API
> Live derivatives and spot market data from Bybit, one of the largest crypto-derivatives exchanges, straight from its public v5 API. Built for perpetual swaps: the ticker returns a contract's last, mark and index price together, the 24-hour change, high, low, volume and turnover, the live open interest in contracts and in USD, and the current funding rate with the next funding time — a whole perp in one call. The funding endpoint returns the historical funding-rate series, the recurring payments that anchor a perp to spot. The openinterest endpoint returns the open-interest time series, the best gauge of leverage building or unwinding. The kline endpoint returns OHLCV candles at any interval. Linear (USDT) perps, inverse (coin) perps and spot are all reachable via the category parameter. Live, no key, nothing stored. Distinct from Coinbase, Bitstamp, OKX, Gate.io, Bitfinex and Gemini venue APIs and from aggregated derivatives feeds — this is Bybit's own ticker, funding history, open interest and candles. Perfect for trading, charting, derivatives-analytics and risk apps.

## 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/bybit-api/..."
```

## Pricing
- **Free** (Free) — 7,000 calls/Mo, 2 req/s
- **Starter** ($13/Mo) — 150,000 calls/Mo, 6 req/s
- **Pro** ($37/Mo) — 900,000 calls/Mo, 18 req/s
- **Business** ($79/Mo) — 4,900,000 calls/Mo, 45 req/s

## Endpoints

### Market

#### `GET /v1/kline` — OHLCV candles

**Parameters:**
- `symbol` (query, required, string) — Bybit symbol Example: `BTCUSDT`
- `interval` (query, optional, string) — 1..720, D, W or M Example: `60`
- `limit` (query, optional, string) — Max 1-200 Example: `50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bybit-api/v1/kline?symbol=BTCUSDT&interval=60&limit=50"
```

**Response:**
```json
{
    "data": {
        "count": 50,
        "source": "Bybit",
        "symbol": "BTCUSDT",
        "candles": [
            {
                "low": 61920.7,
                "high": 62250.1,
                "open": 62071.5,
                "time": "2026-06-09T20:00:00.000Z",
                "close": 61984.1,
                "volume": 1767.783,
                "turnover": 109744025.2588
            },
            {
                "low": 61690.9,
                "high": 62087.1,
                "open": 61760.6,
                "time": "2026-06-09T19:00:00.000Z",
                "close": 62071.5,
                "volume": 3823.956,
                "turnover": 236641505.3364
            },
            {
                "low": 61565.8,
                "high": 61954.5,
                "open": 61667.7,
                "time": "2026-06-09T18:00:00.000Z",
                "close": 61760.6,
                "volume": 3546.046,
                "turnover": 218882096.3615
            },
            {
                "low": 61362,
                "high": 61877.1,
                "open": 61362,
                "time": "2026-06-09T17:00:00.000Z",
                "close": 61667.7,
                "volume": 6679.208,
                "turnover": 411763084.3545
            },
            {
                "low": 60705,
                "high": 61475,
                "open": 61104.9,
                "time": "2026-06-09T16:00:00.000Z",
                "close": 61362,
                "volume": 1138
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/ticker` — Contract ticker incl. OI and funding

**Parameters:**
- `symbol` (query, required, string) — Bybit symbol Example: `BTCUSDT`
- `category` (query, optional, string) — linear, inverse or spot Example: `linear`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bybit-api/v1/ticker?symbol=BTCUSDT&category=linear"
```

**Response:**
```json
{
    "data": {
        "ask": 61984.1,
        "bid": 61984,
        "source": "Bybit",
        "symbol": "BTCUSDT",
        "low_24h": 60705,
        "category": "linear",
        "high_24h": 63840.7,
        "last_price": 61984,
        "mark_price": 61984,
        "volume_24h": 102335.639,
        "index_price": 62012.65,
        "funding_rate": 5.494e-5,
        "turnover_24h": 6367343183.8335,
        "open_interest": 55189.169,
        "change_24h_pct": -1.9987,
        "prev_price_24h": 63248.2,
        "funding_rate_pct": 0.005494,
        "next_funding_time": "2026-06-10T00:00:00.000Z",
        "open_interest_value": 3420845451.3
    },
    "meta": {
        "timestamp": "2026-06-09T20:24:31.546Z",
        "request_id": "2fb972ac-7831-4ce3-8c50-08df417584af"
    },
    "status": "ok",
    "message": "Ticker retrieved successfully",
    "success": true
}
```

### Derivatives

#### `GET /v1/funding` — Historical funding-rate series

**Parameters:**
- `symbol` (query, required, string) — Bybit perp symbol Example: `BTCUSDT`
- `limit` (query, optional, string) — Max 1-200 Example: `30`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bybit-api/v1/funding?symbol=BTCUSDT&limit=30"
```

**Response:**
```json
{
    "data": {
        "count": 30,
        "source": "Bybit",
        "symbol": "BTCUSDT",
        "funding": [
            {
                "time": "2026-06-09T16:00:00.000Z",
                "symbol": "BTCUSDT",
                "funding_rate": 1.714e-5,
                "funding_rate_pct": 0.001714
            },
            {
                "time": "2026-06-09T08:00:00.000Z",
                "symbol": "BTCUSDT",
                "funding_rate": 3.712e-5,
                "funding_rate_pct": 0.003712
            },
            {
                "time": "2026-06-09T00:00:00.000Z",
                "symbol": "BTCUSDT",
                "funding_rate": 1.644e-5,
                "funding_rate_pct": 0.001644
            },
            {
                "time": "2026-06-08T16:00:00.000Z",
                "symbol": "BTCUSDT",
                "funding_rate": 3.697e-5,
                "funding_rate_pct": 0.003697
            },
            {
                "time": "2026-06-08T08:00:00.000Z",
                "symbol": "BTCUSDT",
                "funding_rate": 2.491e-5,
                "funding_rate_pct": 0.002491
            },
            {
                "time": "2026-06-08T00:00:00.000Z",
                "symbol": "BTCUSDT",
                "funding_rate": 8.39e-6,
                "funding_rate_pct": 0.000839
            },
            {
                "time": "2026-06-07T16:00:00.000Z",
                "symbol": "BTCUSDT",
                "funding_rate": 1.038e-5,
            
…(truncated, see openapi.json for full schema)
```

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

**Parameters:**
- `symbol` (query, required, string) — Bybit perp symbol Example: `BTCUSDT`
- `interval` (query, optional, string) — 5min..1d Example: `1h`
- `limit` (query, optional, string) — Max 1-200 Example: `30`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bybit-api/v1/openinterest?symbol=BTCUSDT&interval=1h&limit=30"
```

**Response:**
```json
{
    "data": {
        "count": 30,
        "source": "Bybit",
        "symbol": "BTCUSDT",
        "category": "linear",
        "interval": "1h",
        "open_interest": [
            {
                "time": "2026-06-09T20:00:00.000Z",
                "open_interest": 55528.886
            },
            {
                "time": "2026-06-09T19:00:00.000Z",
                "open_interest": 55859.079
            },
            {
                "time": "2026-06-09T18:00:00.000Z",
                "open_interest": 56024.942
            },
            {
                "time": "2026-06-09T17:00:00.000Z",
                "open_interest": 55745.054
            },
            {
                "time": "2026-06-09T16:00:00.000Z",
                "open_interest": 55697.862
            },
            {
                "time": "2026-06-09T15:00:00.000Z",
                "open_interest": 55111.407
            },
            {
                "time": "2026-06-09T14:00:00.000Z",
                "open_interest": 55495.514
            },
            {
                "time": "2026-06-09T13:00:00.000Z",
                "open_interest": 54809.996
            },
            {
                "time": "2026-06-09T12:00:00.000Z",
                "open_interest": 54542.756
            },
            {
                "time": "2026-06-09T11:00:00.000Z",
                "open_interest": 54149.857
            },
            {
                "time": "2026-06-09T10:00:00.000Z",
                "o
…(truncated, see openapi.json for full schema)
```


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