bbo WebSocket subscription, the documented data type is WsBbo. The record contains a coin, a timestamp, and a two-position array of nullable WsLevel values. The cited subscriptions documentation does not label which tuple position is bid or ask, and it does not define what a null position means.
As of 2026-12-04, the side mapping and null semantics should be treated as unconfirmed unless you have a first-party source that states them explicitly.
Documented subscription and record shape
The bbo subscription message is:
{
"method": "subscribe",
"subscription": {
"type": "bbo",
"coin": "BTC"
}
}
The documented WsBbo type is:
interface WsBbo {
coin: string;
time: number;
bbo: [WsLevel | null, WsLevel | null];
}
interface WsLevel {
px: string; // price
sz: string; // size
n: number; // number of orders
}
The docs also state that WsBbo updates are sent only if the BBO changes on a block.
An illustrative message shape using placeholder values only โ not a captured live response and not a description of any real quote โ would look like:
{
"channel": "bbo",
"data": {
"coin": "BTC",
"time": 1762200000000,
"bbo": [
{
"px": "118000.5",
"sz": "0.25",
"n": 3
},
null
]
}
}
What the cited documentation does and does not specify
Like what you're reading? Try it yourself โ this link supports ChartedTrader at no cost to you.
Create a Hyperliquid account โ| Item | Documented? | Notes |
|---|---|---|
coin field | Yes | Coin symbol for the BBO update. |
time field | Yes | Timestamp in the WsBbo record. |
bbo is a two-position nullable tuple | Yes | Each position is WsLevel or null. |
WsLevel.px | Yes | Price. |
WsLevel.sz | Yes | Size. |
WsLevel.n | Yes | Number of orders. |
| Which tuple position is bid | No | The cited documentation does not label the positions. |
| Which tuple position is ask | No | The cited documentation does not label the positions. |
Meaning of null | No | The cited documentation does not define whether null means no resting level, unavailable data, unknown data, or another state. |
WsBbo.bbo.
Treating the mapping as unresolved
Because the cited documentation does not state which slot is the bid or the ask, and does not define null, do not hard-code an interpretation into production logic on the basis of this page alone. If you need a confirmed mapping, raise it through Hyperliquid's official support channels and record the answer with a date, since documentation and behaviour can change.
Practical handling for API consumers
Avoid hard-coding assumptions such as:
// Do not assume this mapping is correct.
const bid = bbo[0];
const ask = bbo[1];
A safer reference approach is to treat the two positions as unlabeled nullable levels until the mapping is confirmed:
type WsLevel = {
px: string;
sz: string;
n: number;
};
type WsBbo = {
coin: string;
time: number;
bbo: [WsLevel | null, WsLevel | null];
};
function describeBbo(record: WsBbo) {
const [left, right] = record.bbo;
return {
coin: record.coin,
time: record.time,
left: left ? { px: left.px, sz: left.sz, n: left.n } : null,
right: right ? { px: right.px, sz: right.sz, n: right.n } : null,
sideMappingConfirmed: false
};
}
This keeps the parser compatible with the documented WsBbo shape without asserting an unsupported bid/ask interpretation.
Sources
Related supa.is references:- Hyperliquid WebSocket Subscriptions: Message Formats, Types, and Examples
- Hyperliquid API Websocket Guide for Developers (2026)
Hyperliquid account link
If you are building against Hyperliquid, you can create a Hyperliquid account through our referral link. This is a commercial link: if you sign up, we may receive a commission. For current fee and discount terms, see the official Hyperliquid fees documentation.
Continue with Hyperliquid
Browse the Hyperliquid guide hub for the complete user journey.