Skip to main content
GET
/
l2book
Get L2 order book
curl --request GET \
  --url https://exchange-api2.bulk.trade/api/v1/l2book
{
  "updateType": "snapshot",
  "symbol": "<string>",
  "levels": [
    [
      {
        "px": 123,
        "sz": 123,
        "n": 123
      }
    ]
  ],
  "timestamp": 123
}
Returns current order book snapshot with optional filtering by price levels and aggregation. For real-time order book data:
  • Use L2 Snapshot stream for periodic full snapshots (every 200ms)
  • Use L2 Delta stream for real-time incremental updates (< 1ms)

Query Parameters

type
enum<string>
required

Must be "l2Book"

Available options:
l2Book
coin
string
required

Market symbol

Example:

"BTC-USD"

nlevels
integer

Number of price levels to return per side

Example:

10

aggregation
number<double>

Price increment for aggregation (in quote currency)

Example:

0.5

Response

Successful response

Order book snapshot or delta

updateType
enum<string>
  • snapshot: Full order book state (both sides populated)
  • delta: Incremental update (only one side has levels, other is empty array)
Available options:
snapshot,
delta
symbol
string

Market symbol

levels
object[][]

Array with exactly 2 elements: [bids, asks]

  • Index 0: Bid levels (highest to lowest price)
  • Index 1: Ask levels (lowest to highest price)
  • For deltas: Only one side will have levels, the other will be an empty array []
Required array length: 2 elements
timestamp
integer<int64>

Timestamp in milliseconds