VeztaVezta
WebSocket Reference

market:orderbook

Order book depth updates

The market:orderbook channel broadcasts order book depth snapshots for active markets. Each update contains the current bid and ask levels with their sizes.

Subscribe

{ "event": "subscribe", "data": { "channel": "market:orderbook" } }

Unsubscribe

{ "event": "unsubscribe", "data": { "channel": "market:orderbook" } }

Server Broadcast

{
  "channel": "market:orderbook",
  "data": {
    "marketId": "c5a2e7f1-3b4d-4e6a-8f9c-1d2e3f4a5b6c",
    "source": "polymarket",
    "bids": [
      { "price": "0.670000", "size": "15234.500000" },
      { "price": "0.665000", "size": "8921.000000" },
      { "price": "0.660000", "size": "22450.750000" },
      { "price": "0.655000", "size": "5100.000000" },
      { "price": "0.650000", "size": "31200.250000" }
    ],
    "asks": [
      { "price": "0.675000", "size": "12500.000000" },
      { "price": "0.680000", "size": "9800.500000" },
      { "price": "0.685000", "size": "18300.000000" },
      { "price": "0.690000", "size": "7650.250000" },
      { "price": "0.695000", "size": "25000.000000" }
    ],
    "spread": "0.005000",
    "updatedAt": "2026-03-27T14:30:00.000Z"
  }
}

Payload Schema

FieldTypeDescription
marketIdstringUnique market identifier (UUID)
sourcestringExchange source: polymarket or kalshi
bidsarrayBuy orders sorted by price descending (best bid first)
bids[].pricestringBid price (Decimal, 6 decimal places)
bids[].sizestringBid size in shares
asksarraySell orders sorted by price ascending (best ask first)
asks[].pricestringAsk price (Decimal, 6 decimal places)
asks[].sizestringAsk size in shares
spreadstringDifference between best ask and best bid
updatedAtstringISO 8601 timestamp

Notes

  • Order book snapshots are refreshed every 60 seconds during the orderbook-sync cycle
  • The number of bid/ask levels varies by market and exchange liquidity
  • Polymarket order books come from the CLOB API; Kalshi order books come from the Trade API v2
  • Spread is calculated as bestAsk - bestBid
  • Size values represent share quantities, not USD amounts

On this page