Messages
{
"op": "sub",
"id": 4,
"t": "bbo@f@500",
"m": "0x8121EE960066e4344A213F9aC7502395502aEe7a",
"feedEpoch": 0
}Exchange WebSocket methods
BBO stream
Receive finalized best bid and offer snapshots.
WSS
/
ws
bbo@f[@<coalesceMs>]
50 milliseconds. It does not use a
replay cursor.
Subscribe
{
"op": "sub",
"id": 4,
"t": "bbo@f@500",
"m": "0x8121EE960066e4344A213F9aC7502395502aEe7a",
"feedEpoch": 0
}
Decoded event
The shape below is the innermessage returned by decodeExchangeWsEnvelope
or decodeExchangeWsMessage. Every binary socket message also carries an outer
id: bigint, matching your subscription ID. Use it to route snapshots, replay,
and live updates. See binary subscription envelopes.
interface ExchangeWsBboLevel {
price: bigint;
totalBase: bigint;
}
interface ExchangeWsBboFrame {
wireVersion: 1;
feedEpoch: bigint;
view: "finalized";
kind: "bbo";
marketAddress: string;
marketSeq: bigint;
globalSeq: bigint;
stateHead: { blockNumber: bigint; blockId: string };
bid: ExchangeWsBboLevel | null;
ask: ExchangeWsBboLevel | null;
}
null. price is a native pp integer and totalBase is a
native sp integer. Both decode as bigint.Messages
{
"op": "sub",
"id": 4,
"t": "bbo@f@500",
"m": "0x8121EE960066e4344A213F9aC7502395502aEe7a",
"feedEpoch": 0
}bbo@f subscription
type:object