Perps BBO
l2:bbo
Best Bid/Offer — sent on every best bid or ask price/amount change. Full state, no deltas.
Channel: l2:bbo:{instrument}
Example: l2:bbo:BTC_USDC-PERPETUAL
Payload
Positional array format. Empty string "" for absent sides.
[1704067200000, "50000", "1000", "50100", "800"]| Index | Type | Field | Description |
|---|---|---|---|
| 0 | integer | timestamp | Unix timestamp in milliseconds |
| 1 | string | best_bid_price | Highest bid price ("" if no bids) |
| 2 | string | best_bid_amount | Notional USD at best bid ("" if no bids) |
| 3 | string | best_ask_price | Lowest ask price ("" if no asks) |
| 4 | string | best_ask_amount | Notional USD at best ask ("" if no asks) |
Subscribe — Protobuf SDK
import { Centrifuge } from "centrifuge/build/protobuf";
const client = new Centrifuge("wss://staging.kyan.sh/stream/websocket?format=protobuf");
const sub = client.newSubscription("l2:bbo:BTC_USDC-PERPETUAL");
sub.on("publication", (ctx) => {
const data = ctx.data instanceof Uint8Array
? JSON.parse(new TextDecoder().decode(ctx.data))
: ctx.data;
const [timestamp, bidPrice, bidAmount, askPrice, askAmount] = data;
// Empty string "" means no bids/asks on that side
});
sub.subscribe();
client.connect();Recovery
BBO channels do not use cache recovery — updates are frequent enough that clients receive data within milliseconds. Reconnect recovery is still automatic (server-pushed).
Related channels
Channels providing related data.
| Channel | Why |
|---|---|
| Index Price | Spot price for the underlying pair. Basis = BBO mid - index. |
| Funding Rate | Funding rate for the instrument. Derived from the basis (perp price - index). |
| Perps L2 | Full 20-level depth behind the top-of-book prices shown here. |
| L2 Grouped | Price-bucketed aggregation of the same orderbook. |
| Options BBO | Options market IV and skew data for the same underlying. |
| Order Lifecycle | Your order fills, cancellations, and MMP events. |
| Trades (Perps) | Public trade tape showing executions, aggressor side, and size. |
Updated about 2 months ago
