# StreamBboBook

> HyperCore private-preview documentation.

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

<Callout intent="info">
  This API is in private preview. Target September 2026; timing is subject to change.
</Callout>


# Stream BBO book

`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.

## Overview

* 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

## Request structure

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

### Coins

**Field**: `coins`
**Type**: `repeated string`

Markets to subscribe to. Empty means all markets.

### Market types

**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.

## Response structure

```proto
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;
}
```

### Key fields

**`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.

## When to use BBO

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