Skip to content
Alchemy Logo

Order books

Beta

HyperCore APIs are in beta. Message fields, limits, and behavior may change, including breaking changes. To request access, contact [email protected].

l2Bookl2BookDiffbboallMidsl4BookUpdates
DeliversComplete level window per changed marketChanged levels onlyBest bid and askMid priceChanged individual orders
Client stateNoneLocal bookNoneNoneLocal order book
DetailAggregated levelsAggregated levelsTop of bookOne priceOrders with queue position
Typical useDisplays, periodic readsEfficient live bookPrices and spreadsPrice trackingMarket making, queue analysis

All book streams begin with a snapshot (isSnapshot: true) and then send a market only when it changes, so quiet markets produce no messages.

For l2BookDiff and l4BookUpdates:

  1. Install the snapshot as local state.
  2. Apply each later message in order.
  3. Watch seq on the subscription. If it skips, you missed a message and your book may be wrong: resubscribe and start again from the new snapshot.
  4. If you receive book_reset, drop local state for that subscription; a new snapshot follows. The book_reset message takes the next seq, so count it.

Book streams don't replay. After any disconnect, resubscribe and rebuild from the snapshot. See replay and recovery.

Was this page helpful?