Options L2
l2:options
Full-depth L2 orderbook for options instruments. Event-driven — published on every book change with incremental deltas and periodic full snapshots.
Channel: l2:options:{pair}:{maturity}
Example: l2:options:ETH_USDC:31OCT25
All instruments in a maturity publish to the same channel with instrument, strike, option_type, and msg_type tags for server-side filtering.
Snapshot payload
Sent on subscribe, periodically (every 20 deltas or 10 seconds), and on reconnect recovery.
{
"type": "snapshot",
"seq": 42,
"timestamp": 1704067200000,
"bids": [
["0.05", "10", 3, "0.62"],
["0.04", "5", 1, "0.58"]
],
"asks": [
["0.07", "8", 2, "0.68"],
["0.08", "4", 1, "0.72"]
],
"mark_price": "0.06",
"mark_iv": "0.65",
"greeks": {
"delta": 0.45,
"gamma": 0.0012,
"vega": 0.15,
"theta": -0.03,
"rho": 0.002
},
"iv_bid": "0.62",
"iv_ask": "0.68"
}| Field | Type | Description |
|---|---|---|
type | string | Always "snapshot" |
seq | integer | Monotonically increasing sequence number |
timestamp | integer | Unix timestamp in milliseconds |
bids | array | Bid levels, best (highest) first |
asks | array | Ask levels, best (lowest) first |
mark_price | string | Mark price from IV blend (omitted if unavailable) |
mark_iv | string | Mark implied volatility (omitted if unavailable) |
greeks | object | Option Greeks: delta, gamma, vega, theta, rho as numbers (omitted if unavailable) |
iv_bid | string | Size-weighted IV at best bid (omitted if unavailable) |
iv_ask | string | Size-weighted IV at best ask (omitted if unavailable) |
Level array elements:
| Index | Type | Description |
|---|---|---|
| 0 | string | Price |
| 1 | string | Contracts |
| 2 | integer | Number of orders at this level |
| 3 | string | Implied volatility at this price level |
Each price level includes its own implied volatility — see the vol book directly alongside price and size.
Delta payload
Incremental updates between snapshots. Only changed levels are sent.
{
"type": "delta",
"seq": 43,
"prev_seq": 42,
"timestamp": 1704067200100,
"bids": [
["new", "0.045", "7", 2, "0.60"],
["change", "0.05", "12", 4, "0.62"],
["delete", "0.04"]
],
"asks": [],
"mark_price": "0.06",
"mark_iv": "0.65",
"greeks": {
"delta": 0.45,
"gamma": 0.0012,
"vega": 0.15,
"theta": -0.03,
"rho": 0.002
}
}| Field | Type | Description |
|---|---|---|
type | string | Always "delta" |
seq | integer | Sequence number for this delta |
prev_seq | integer | Expected previous sequence number (for gap detection) |
timestamp | integer | Unix timestamp in milliseconds |
bids | array | Bid level changes |
asks | array | Ask level changes |
mark_price | string | Mark price (omitted if unavailable) |
mark_iv | string | Mark implied volatility (omitted if unavailable) |
greeks | object | Option Greeks: delta, gamma, vega, theta, rho as numbers (omitted if unavailable) |
iv_bid | string | Size-weighted IV at best bid (omitted if unavailable) |
iv_ask | string | Size-weighted IV at best ask (omitted if unavailable) |
Delta level formats:
| Action | Format | Description |
|---|---|---|
| New | ["new", price, contracts, order_count(int), iv] | New price level added |
| Change | ["change", price, contracts, order_count(int), iv] | Existing level updated |
| Delete | ["delete", price] | Price level removed |
Gap detection and recovery
Clients track seq and verify prev_seq on each delta:
let lastSeq = 0;
sub.on("publication", (ctx) => {
const data = /* decode */;
if (data.type === "snapshot") {
lastSeq = data.seq;
// Replace local book state
return;
}
if (data.type === "delta") {
if (data.prev_seq !== lastSeq) {
// Gap detected — re-subscribe to get fresh snapshot
sub.unsubscribe();
sub.subscribe();
return;
}
lastSeq = data.seq;
// Apply delta to local book state
}
});The publisher forces a full snapshot every 20 deltas or 10 seconds, serving as recovery anchors.
Payload Format
Every message includes the instrument field identifying which instrument the snapshot or delta belongs to:
{
"instrument": "ETH_USDC-31OCT25-130000-C",
"type": "snapshot",
"seq": 42,
...
}Tag Filtering
Publications carry instrument, strike, option_type, and msg_type tags.
| Tag | Example | Description |
|---|---|---|
instrument | ETH_USDC-31OCT25-130000-C | Filter by exact instrument |
strike | 130000 | Filter by strike price |
option_type | C or P | Filter by calls or puts |
msg_type | snapshot or delta | Filter by message type (e.g. snapshots only) |
Subscribe — Protobuf SDK
All instruments in a maturity
import { Centrifuge } from "centrifuge/build/protobuf";
const client = new Centrifuge("wss://staging.kyan.sh/stream/websocket?format=protobuf");
const sub = client.newSubscription("l2:options:ETH_USDC:31OCT25", { since: {} });
sub.on("publication", (ctx) => {
const data = ctx.data instanceof Uint8Array
? JSON.parse(new TextDecoder().decode(ctx.data))
: ctx.data;
const { instrument, type, seq, bids, asks } = data;
// Handle snapshot/delta per instrument
});
sub.subscribe();
client.connect();Filtered: specific instrument
const sub = client.newSubscription("l2:options:ETH_USDC:31OCT25", {
since: {},
tagsFilter: { key: "instrument", cmp: "eq", val: "ETH_USDC-31OCT25-130000-C" }
});Filtered: snapshots only (skip deltas)
const sub = client.newSubscription("l2:options:ETH_USDC:31OCT25", {
since: {},
tagsFilter: { key: "msg_type", cmp: "eq", val: "snapshot" }
});Recovery
Subscribe with since: {} to receive the last known update on subscribe. On reconnect, the SDK automatically recovers. If the received message is a delta and a gap is detected, re-subscribe to trigger a fresh snapshot (every 20 deltas or 10 seconds).
Related channels
Channels providing related data.
| Channel | Why |
|---|---|
| Index Price | Underlying spot price. Needed to convert price levels to moneyness. |
| SVI Surface | Vol surface parameters. Each L2 level includes per-level IV; SVI provides the fitted surface for the same maturity. |
| Interest Rate | Risk-free rate. Needed alongside index price to compute the forward price. |
| Options BBO | Top-of-book summary with pre-computed Greeks, edge, and spread derived from this depth data. |
| Perps L2 | Perps orderbook depth for the same underlying. |
| Funding Rate | Funding rate on the perps instrument for the same underlying. |
| Order Lifecycle | Your order state, fills, and cancellations. |
| Trades (Options) | Public options trade tape showing executions against this book. |
Updated about 2 months ago
