Skip to content
Alchemy Logo

StreamBboBook

This API is in private preview. Target September 2026; timing is subject to change.

StreamBboBook delivers the top-of-book best bid and offer when either side changes. This is ideal for live price and spread displays, routing decisions, and applications where full depth is wasted bandwidth.

  • Emitted only when the best bid or the best ask changes for a market
  • Top of book only — use StreamL2Book for depth
  • A null side means there are no resting orders on that side
  • Every message is complete, so there is nothing to replay

message StreamBboBookRequest {
  repeated string coins = 1;
  repeated string market_types = 2;
}

Field: coins Type: repeated string

Markets to subscribe to. Empty means all markets.

Field: market_types Type: repeated string

Accepted values are perp, spot, outcome, or *. The default is ["perp"], so spot and outcome markets are not delivered unless requested. The default never grows: add new market types explicitly, or pass ["*"] to opt in to future types automatically. This field is rejected when combined with an explicit coins list.

message BboBookUpdate {
  string coin = 1;
  uint64 height = 2;
  uint64 time = 3;
  Level bid = 4;
  Level ask = 5;
}
 
message Level {
  string px = 1;
  string sz = 2;
  uint32 n = 3;
}

coin: Market symbol.

height: Block number.

time: Block timestamp in milliseconds.

bid: The best bid as a Level (px, sz, n). Null when there are no resting bids.

ask: The best ask as a Level (px, sz, n). Null when there are no resting asks.

Use this stream for spread monitoring, price displays, routing decisions, and any case where full depth is wasted bandwidth.

Was this page helpful?