> For the complete documentation index, see [llms.txt](https://docs.koinju.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.koinju.io/data/option-chain.md).

# Option chain

5-minute snapshots of every listed option across Deribit, Binance, OKX, and Bybit. One row per (exchange, instrument, snapshot) carrying mark / bid / ask prices, implied volatilities, greeks, open interest, and 24h volume.

> **History.** Chain snapshots are available from **2026-05-12** onward (all four exchanges). For option history before that date, use the option **trade** tape instead — `api.trade` with `exchange = 'deribit-option'` reaches back to 2016 (see [Coverage](/data/coverage.md)) — and recompute IV / greeks from the premium.

## SQL API

### `api.option_chains`

| Column             | Type               | Description                                                 |
| ------------------ | ------------------ | ----------------------------------------------------------- |
| `exchange`         | LowCardinality     | `deribit`, `binance`, `okx`, or `bybit`                     |
| `timestamp`        | DateTime64(9, UTC) | Snapshot time (5-minute cadence)                            |
| `instrument_name`  | String             | Exchange-native instrument id                               |
| `underlying_asset` | LowCardinality     | Underlying coin (e.g. `BTC`, `ETH`, `SOL`)                  |
| `quote_asset`      | LowCardinality     | Premium-denomination asset                                  |
| `expiration`       | DateTime64(9, UTC) | Expiry time                                                 |
| `strike`           | Decimal(38, 18)    | Strike price                                                |
| `option_type`      | Enum8('C','P')     | Call or Put                                                 |
| `bid_price`        | Decimal(38, 18)    | Best bid                                                    |
| `ask_price`        | Decimal(38, 18)    | Best ask                                                    |
| `last_price`       | Decimal(38, 18)    | Last trade                                                  |
| `mark_price`       | Decimal(38, 18)    | Exchange mark                                               |
| `index_price`      | Decimal(38, 18)    | Underlying index price                                      |
| `underlying_price` | Decimal(38, 18)    | Spot/forward of the underlying at snapshot time             |
| `mark_iv`          | Decimal(38, 18)    | Mark implied volatility, **annualized %** (e.g. 65.0 = 65%) |
| `bid_iv`           | Decimal(38, 18)    | Bid IV, annualized %                                        |
| `ask_iv`           | Decimal(38, 18)    | Ask IV, annualized %                                        |
| `delta`            | Decimal(38, 18)    | Delta                                                       |
| `gamma`            | Decimal(38, 18)    | Gamma                                                       |
| `vega`             | Decimal(38, 18)    | Vega                                                        |
| `theta`            | Decimal(38, 18)    | Theta                                                       |
| `open_interest`    | Decimal(38, 18)    | Open interest (contracts)                                   |
| `volume_24h`       | Decimal(38, 18)    | Trailing 24h volume                                         |
| `state`            | LowCardinality     | Exchange-reported state (`open`, `TRADING`, `live`, etc.)   |

> **Implied volatility unit.** All four exchanges return IV annualized; we normalize the scale at ingest so `mark_iv = 65.0` means 65% annualized vol regardless of source exchange.

### Examples

**1. Latest snapshot of the BTC option chain on Deribit:**

```sql
WITH (
  SELECT max(timestamp)
  FROM api.option_chains
  WHERE exchange = 'deribit' AND underlying_asset = 'BTC'
) AS latest_ts
SELECT *
FROM api.option_chains
WHERE exchange = 'deribit'
  AND underlying_asset = 'BTC'
  AND timestamp = latest_ts
ORDER BY expiration, strike, option_type
```

**2. ATM volatility smile for one expiration (any exchange):**

```sql
WITH (
  SELECT max(timestamp)
  FROM api.option_chains
  WHERE exchange = 'deribit' AND underlying_asset = 'BTC'
) AS latest_ts
SELECT strike, option_type, mark_iv, bid_iv, ask_iv
FROM api.option_chains
WHERE exchange = 'deribit'
  AND underlying_asset = 'BTC'
  AND toDate(expiration) = toDate('2026-06-26')
  AND timestamp = latest_ts
  AND mark_iv != 0
ORDER BY strike, option_type
```

**3. ATM-strike IV across exchanges (cross-venue arb signal):**

```sql
WITH (
  SELECT max(timestamp)
  FROM api.option_chains
  WHERE underlying_asset = 'BTC'
) AS latest_ts
SELECT exchange, instrument_name, mark_iv, mark_price
FROM api.option_chains
WHERE underlying_asset = 'BTC'
  AND option_type = 'C'
  AND timestamp = latest_ts
  AND underlying_price > 0
  AND abs(strike - underlying_price) / toFloat64(underlying_price) < 0.02
ORDER BY exchange, abs(strike - underlying_price)
LIMIT 8
```

## REST API

## Get Option Chain Snapshot

> Latest 5-minute snapshot of the full option chain for (exchange, underlying\_asset). Returns one row per listed instrument with prices, IVs, greeks, OI, and 24h volume.<br>

```json
{"openapi":"3.1.1","info":{"title":"Koinju Market Data API","version":"1.0.0"},"servers":[{"url":"https://api.koinju.io","description":"Koinju API Server"}],"security":[{"apiKeyAuth":[]}],"components":{"securitySchemes":{"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"Required for /ohlcv and /trade endpoints.\nPass your API key in the x-api-key header.\nPublic /market/* endpoints do not require authentication.\n"}},"schemas":{"OptionChainRow":{"type":"object","properties":{"instrument_name":{"type":"string","description":"Exchange-native instrument identifier"},"expiration":{"type":"string","format":"date","description":"Expiry date (UTC)"},"strike":{"type":"number","format":"decimal","description":"Strike price"},"option_type":{"type":"string","enum":["C","P"],"description":"Call or Put"},"mark_price":{"type":"number","format":"decimal","description":"Mark price (in underlying)"},"bid_price":{"type":"number","format":"decimal","description":"Best bid"},"ask_price":{"type":"number","format":"decimal","description":"Best ask"},"mark_iv":{"type":"number","format":"decimal","description":"Mark implied volatility (annualized %)"},"bid_iv":{"type":"number","format":"decimal","description":"Bid IV"},"ask_iv":{"type":"number","format":"decimal","description":"Ask IV"},"delta":{"type":"number","format":"decimal","description":"Delta"},"gamma":{"type":"number","format":"decimal","description":"Gamma"},"vega":{"type":"number","format":"decimal","description":"Vega"},"theta":{"type":"number","format":"decimal","description":"Theta"},"open_interest":{"type":"number","format":"decimal","description":"Open interest"},"volume_24h":{"type":"number","format":"decimal","description":"24h trading volume"},"underlying_price":{"type":"number","format":"decimal","description":"Spot/index price of the underlying at snapshot time"},"dte":{"type":"integer","description":"Days-to-expiry from snapshot timestamp"}}}}},"paths":{"/option/chain":{"get":{"summary":"Get Option Chain Snapshot","description":"Latest 5-minute snapshot of the full option chain for (exchange, underlying_asset). Returns one row per listed instrument with prices, IVs, greeks, OI, and 24h volume.\n","tags":["market_data"],"parameters":[{"name":"exchange","in":"query","required":true,"schema":{"type":"string","enum":["deribit","binance","okx","bybit"]},"description":"Exchange to query — one of `deribit`, `binance`, `okx`, `bybit`."},{"name":"underlying_asset","in":"query","required":true,"schema":{"type":"string"},"description":"Underlying coin (e.g. `BTC`, `ETH`, `SOL`)."},{"name":"expiration","in":"query","required":true,"schema":{"type":"string","format":"date"},"description":"Expiry date, ISO (YYYY-MM-DD). Required."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OptionChainRow"}}}}}}}}}}
```
