Skip to main content
Package: monaco.api.orderbook Source: protos/api/orderbook.proto Use OrderbookService for public orderbook snapshots.

Notes

  • GetOrderbookRPC is a gRPC-only wrapper over the same response type.
  • levels is 1 to 1000 per side (default 20); a value outside that range returns INVALID_ARGUMENT.
  • Every response carries book_seq, the durable-log sequence the snapshot is exact as of and the watermark the WebSocket orderbook and depth channels carry. It is a point-in-time read and a staleness check, not a base for applying WebSocket depth frames. sequence_number is always 0.
  • The snapshot follows order acknowledgements by a short interval (tens of milliseconds, occasionally a few hundred), so an order just placed or cancelled can be missing from a read made straight after the acknowledgement.
  • UNAVAILABLE means the book cannot be read right now, at any depth. Retry.
  • Every read counts toward an orderbook read budget: one for 100 levels or fewer, a deeper one above. A read over budget returns RESOURCE_EXHAUSTED with a retry delay.
  • Prices are decimal strings with no trailing zeros (an order entered at 100.50 rests at 100.5).
  • For a live book, use the depth WebSocket channel.