book-stream endpoint streams ten levels of order book depth per side for a
pair of token mints. See Market Data Streams
for what the depth means and when to use the stream; this page documents the
message format.
Book levels are approximations computed at runtime, on direct routes
only. Each level’s size is cumulative from the spot outward.
Access to the book stream is gated. Reach out to the team to request access.
Connection
See the Websockets Overview for endpoint details.Subscribe
Send asubscribe op with the base and quote mints:
Unsubscribe
Message Format
Each message is a batch covering one slot.b and a each carry ten levels,
ordered nearest to spot outward:
Fields
Each entry in
updates has:
Each level in
b and a has:
Code Examples
Subscribe to a Pair
Subscribe to a Pair
TypeScript Interface
TypeScript Interface
Related
Quote Stream
Stream top-of-book bid and ask
Market Data Streams
How the streams work and when to use each
Websockets Overview
Connection details for Trading API streams
Stream Order Book Depth
Recipe: connect, subscribe, and render depth