# Backpack Exchange API
> Live spot and perpetual-futures market data from Backpack, the Solana-native crypto exchange, with no key. List every spot and perp market; read the 24h ticker for any pair (last price, change, high/low, volume, trade count); pull the order-book depth, OHLC candlesticks and most-recent trades; and for perpetuals read the mark price, index price, funding rate and open interest. The live exchange-data / derivatives layer for trading bots, dashboards, arbitrage and analytics — distinct from the Binance, bitFlyer and XT exchange readers. Live from Backpack; short cache only.

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

## Pricing
- **Free** (Free) — 15,000 calls/Mo, 3 req/s
- **Starter** ($14/Mo) — 330,000 calls/Mo, 8 req/s
- **Pro** ($42/Mo) — 1,700,000 calls/Mo, 20 req/s
- **Enterprise** ($109/Mo) — 9,000,000 calls/Mo, 60 req/s

## Endpoints

### Market

#### `GET /v1/klines` — OHLC candlesticks for a market

**Parameters:**
- `symbol` (query, required, string) — Backpack market symbol, e.g. SOL_USDC Example: `SOL_USDC`
- `interval` (query, optional, string) — 1m,5m,15m,1h,4h,1d,1w… (default 1h) Example: `1h`
- `limit` (query, optional, string) — Candles (1-500, default 100) Example: `100`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/backpack-api/v1/klines?symbol=SOL_USDC&interval=1h&limit=100"
```

**Response:**
```json
{
    "data": {
        "note": "OHLC candlesticks for one Backpack market — each candle's open, high, low, close, volume and trade count. Pass symbol (e.g. SOL_USDC), interval (1m,5m,15m,1h,4h,1d,1w… default 1h) and limit (default 100, max 500).",
        "count": 100,
        "source": "Backpack",
        "symbol": "SOL_USDC",
        "candles": [
            {
                "end": "2026-06-10 15:00:00",
                "low": 64.58,
                "high": 65.23,
                "open": 65.04,
                "close": 65.02,
                "start": "2026-06-10 14:00:00",
                "trades": 191,
                "volume": 392.59,
                "quote_volume": 25484.5673
            },
            {
                "end": "2026-06-10 16:00:00",
                "low": 64.53,
                "high": 65.7,
                "open": 65.03,
                "close": 65.38,
                "start": "2026-06-10 15:00:00",
                "trades": 378,
                "volume": 1422.47,
                "quote_volume": 92647.4519
            },
            {
                "end": "2026-06-10 17:00:00",
                "low": 64.22,
                "high": 65.4,
                "open": 65.4,
                "close": 64.54,
                "start": "2026-06-10 16:00:00",
                "trades": 157,
                "volume": 420.69,
                "quote_volume": 27368.0348
            },
            {
                "end": "2026-06-10 18:00:00",
                "low"
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/markets` — All spot & perp markets

**Parameters:**
- `type` (query, optional, string) — Filter: SPOT or PERP (omit for all) Example: `PERP`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/backpack-api/v1/markets?type=PERP"
```

**Response:**
```json
{
    "data": {
        "note": "Every spot and perpetual market listed on Backpack — each with its symbol, base/quote assets, market type (SPOT or PERP) and order-book state. Pass type=SPOT or type=PERP to filter. Use a symbol with the ticker, order-book, klines, trades and funding endpoints.",
        "type": "PERP",
        "count": 84,
        "source": "Backpack",
        "markets": [
            {
                "base": "SOL",
                "quote": "USDC",
                "status": "Open",
                "symbol": "SOL_USDC_PERP",
                "created_at": "2025-01-21T06:34:54.691858",
                "market_type": "PERP"
            },
            {
                "base": "BTC",
                "quote": "USDC",
                "status": "Open",
                "symbol": "BTC_USDC_PERP",
                "created_at": "2025-01-21T06:34:54.691858",
                "market_type": "PERP"
            },
            {
                "base": "ETH",
                "quote": "USDC",
                "status": "Open",
                "symbol": "ETH_USDC_PERP",
                "created_at": "2025-01-21T06:34:54.691858",
                "market_type": "PERP"
            },
            {
                "base": "XRP",
                "quote": "USDC",
                "status": "Open",
                "symbol": "XRP_USDC_PERP",
                "created_at": "2025-01-28T07:19:32.810746",
                "market_type": "PERP"
            },
            {
                "ba
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/orderbook` — Order-book depth for a market

**Parameters:**
- `symbol` (query, required, string) — Backpack market symbol, e.g. SOL_USDC Example: `SOL_USDC`
- `depth` (query, optional, string) — Levels per side (1-100, default 25) Example: `25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/backpack-api/v1/orderbook?symbol=SOL_USDC&depth=25"
```

**Response:**
```json
{
    "data": {
        "asks": [
            {
                "size": 4.51,
                "price": 67.53
            },
            {
                "size": 153.57,
                "price": 67.54
            },
            {
                "size": 278.16,
                "price": 67.55
            },
            {
                "size": 149.36,
                "price": 67.56
            },
            {
                "size": 38.25,
                "price": 67.57
            },
            {
                "size": 302.96,
                "price": 67.58
            },
            {
                "size": 23.76,
                "price": 67.59
            },
            {
                "size": 110.97,
                "price": 67.6
            },
            {
                "size": 0.07,
                "price": 67.63
            },
            {
                "size": 7.15,
                "price": 67.64
            },
            {
                "size": 0.09,
                "price": 67.7
            },
            {
                "size": 3.91,
                "price": 67.71
            },
            {
                "size": 0.08,
                "price": 67.72
            },
            {
                "size": 4.84,
                "price": 67.76
            },
            {
                "size": 0.09,
                "price": 67.8
            },
            {
                "size": 0.12,
                "price": 67.81
            },
            {
   
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/ticker` — 24h ticker for a market (or all)

**Parameters:**
- `symbol` (query, optional, string) — Backpack market symbol, e.g. SOL_USDC; omit for every market Example: `SOL_USDC`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/backpack-api/v1/ticker?symbol=SOL_USDC"
```

**Response:**
```json
{
    "data": {
        "note": "The live 24h ticker for one Backpack market — last price, 24h change (absolute and percent), high/low, base and quote volume and trade count. Pass symbol (e.g. SOL_USDC); omit it for every market.",
        "source": "Backpack",
        "symbol": "SOL_USDC",
        "ticker": {
            "low": 66.96,
            "high": 69.55,
            "symbol": "SOL_USDC",
            "trades": 2482,
            "volume": 8086.1,
            "last_price": 67.45,
            "first_price": 67.94,
            "price_change": -0.49,
            "quote_volume": 552797.4426,
            "price_change_percent": -0.007212
        }
    },
    "meta": {
        "timestamp": "2026-06-14T17:03:35.170Z",
        "request_id": "61aaf3df-8f3f-4231-8843-2697917c7bcb"
    },
    "status": "ok",
    "message": "Ticker retrieved successfully",
    "success": true
}
```

#### `GET /v1/trades` — Recent trades for a market

**Parameters:**
- `symbol` (query, required, string) — Backpack market symbol, e.g. SOL_USDC Example: `SOL_USDC`
- `limit` (query, optional, string) — Trades (1-200, default 50) Example: `50`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/backpack-api/v1/trades?symbol=SOL_USDC&limit=50"
```

**Response:**
```json
{
    "data": {
        "note": "The most recent trades on one Backpack market — each with price, quantity, the taker side (buy/sell) and timestamp. Pass symbol (e.g. SOL_USDC) and limit (default 50, max 200).",
        "count": 50,
        "source": "Backpack",
        "symbol": "SOL_USDC",
        "trades": [
            {
                "id": 381196122,
                "side": "buy",
                "price": 67.45,
                "quantity": 3.56,
                "timestamp": 1781456493295,
                "quote_quantity": 240.122
            },
            {
                "id": 381196121,
                "side": "buy",
                "price": 67.45,
                "quantity": 1.8,
                "timestamp": 1781456493252,
                "quote_quantity": 121.41
            },
            {
                "id": 381196120,
                "side": "buy",
                "price": 67.47,
                "quantity": 0.01,
                "timestamp": 1781456399731,
                "quote_quantity": 0.6747
            },
            {
                "id": 381196119,
                "side": "buy",
                "price": 67.5,
                "quantity": 0.02,
                "timestamp": 1781456219731,
                "quote_quantity": 1.35
            },
            {
                "id": 381196118,
                "side": "buy",
                "price": 67.5,
                "quantity": 0.03,
                "timestamp": 1781456219731,
                "quote_qu
…(truncated, see openapi.json for full schema)
```

### Perpetuals

#### `GET /v1/funding` — Perp mark price, funding rate & open interest

**Parameters:**
- `symbol` (query, required, string) — Perp symbol, e.g. SOL_USDC_PERP (a _PERP suffix is added if omitted) Example: `SOL_USDC_PERP`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/backpack-api/v1/funding?symbol=SOL_USDC_PERP"
```

**Response:**
```json
{
    "data": {
        "note": "Perpetual-futures funding for one Backpack perp market — the mark price, index price, current funding rate, next funding time and open interest. Pass symbol (a perp, e.g. SOL_USDC_PERP; a _PERP suffix is added if omitted).",
        "source": "Backpack",
        "symbol": "SOL_USDC_PERP",
        "mark_price": 67.49,
        "index_price": 67.52583831,
        "funding_rate": -7.899852273856142e-6,
        "open_interest": 234808.32,
        "next_funding_timestamp": 1781460000000,
        "open_interest_timestamp": 1781456615786
    },
    "meta": {
        "timestamp": "2026-06-14T17:03:35.906Z",
        "request_id": "bde60d0d-b449-4549-86ad-939ba85fa9b7"
    },
    "status": "ok",
    "message": "Funding retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Endpoints, intervals & source

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

**Response:**
```json
{
    "data": {
        "sample": {
            "sol_usdc_last": 67.45
        },
        "source": "Backpack Exchange public market API (api.backpack.exchange/api/v1), keyless",
        "service": "backpack-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/klines": "OHLC candlesticks (symbol, interval, limit).",
            "GET /v1/ticker": "24h ticker for one market (symbol) or all markets.",
            "GET /v1/trades": "Recent trades (symbol, limit).",
            "GET /v1/funding": "Perp mark price, funding rate and open interest (symbol).",
            "GET /v1/markets": "Every spot and perp market (optional type=SPOT|PERP).",
            "GET /v1/orderbook": "Order-book depth for one market (symbol, depth)."
        },
        "description": "Live spot and perpetual market data from Backpack, the Solana-native crypto exchange, with no key: every listed market, the 24h ticker for any pair, order-book depth, OHLC candlesticks, recent trades and — for perpetuals — mark price, index price, funding rate and open interest. The exchange-data / live-ticker / derivatives layer for trading bots, dashboards and analytics. Distinct from the Binance, bitFlyer and XT exchange readers. Live, short cache only.",
        "kline_intervals": [
            "1m",
            "3m",
            "5m",
            "15m",
            "30m",
            "1h",
            "2h",
            "4h",
            "6h",
            "8h",
            "1
…(truncated, see openapi.json for full schema)
```


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