Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

L2 Book

Aggregated price levels, sent as periodic snapshots.

{"method": "subscribe", "subscription": {"type": "l2Book", "coin": "BTC"}}

Optional fields:

  • nSigFigs: Significant figures for price aggregation (2-5)
  • nLevels: Number of price levels per side (default 20, max 100)
  • mantissa: Price rounding mantissa (2 or 5, only when nSigFigs=5)
  • interval: Update interval (default "500ms"). Valid values: "100ms", "200ms", "500ms"

Data format: L2BookData

{"channel": "l2Book", "data": {"coin": "BTC", "time": 1699900000000, "levels": [[{"px": "65000.0", "sz": "1.5", "n": 3}], [{"px": "65001.0", "sz": "1.0", "n": 2}]]}}

The levels array contains [bids, asks].