> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kraken.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Spot WebSocket

> Reference for the Spot WebSocket API — v2 (recommended) and v1 (maintained)

Real-time market data and streaming order entry over a persistent
connection. **v2 is recommended for all new integrations**; v1 is
maintained for existing clients.

For connection details, version differences, ping/pong, and rate-limit
behaviour, see the [Spot WebSocket
overview](/exchange/guides/websockets/introduction).

## Endpoints

| Environment  | Public                        | Private (auth)                     |
| :----------- | :---------------------------- | :--------------------------------- |
| v2 — Primary | `wss://ws.kraken.com/v2`      | `wss://ws-auth.kraken.com/v2`      |
| v2 — Beta    | `wss://beta-ws.kraken.com/v2` | `wss://beta-ws-auth.kraken.com/v2` |
| v1 — Primary | `wss://ws.kraken.com`         | `wss://ws-auth.kraken.com`         |
| v1 — Beta    | `wss://beta-ws.kraken.com`    | `wss://beta-ws-auth.kraken.com`    |

Beta endpoints share the production trading engine but receive new
features ahead of primary — used for client validation when announced.

## Authentication

Private channels require a **WebSocket token**, retrieved via the Spot
REST endpoint
[`GetWebSocketsToken`](/api-reference/trading/get-websockets-token).
Tokens are short-lived; obtain a fresh token on each connection.

See [WebSocket
authentication](/exchange/guides/websockets/authentication) for the
full flow.

## v2 vs v1

| Feature                | v1            | v2                          |
| :--------------------- | :------------ | :-------------------------- |
| Message format         | Array         | Normalised JSON object      |
| Symbol format          | `XBT/USD`     | `BTC/USD`                   |
| Timestamp              | Epoch sec, μs | RFC 3339 (`2026-04-28T...`) |
| L3 order-by-order book | —             | ✅                           |
| Book checksum          | Updates only  | Snapshot + updates          |
| Trade ID               | —             | Sequential int              |
| New features           | Frozen        | Active                      |

## Quick start

<CardGroup cols={2}>
  <Card title="book (L2)" icon="layer-group" href="/exchange/api-reference/spot-websocket-v2/book">
    Order book snapshots + incremental updates with CRC32 checksums.
  </Card>

  <Card title="executions" icon="receipt" href="/exchange/api-reference/spot-websocket-v2/executions">
    Private order acks, fills, and amends — the canonical order-state stream.
  </Card>

  <Card title="add_order" icon="plus" href="/exchange/api-reference/spot-websocket-v2/add_order">
    Place an order over the open WebSocket connection.
  </Card>

  <Card title="cancel_after" icon="clock" href="/exchange/api-reference/spot-websocket-v2/cancel_after">
    Dead-man's switch — cancel all orders if the client stops checking in.
  </Card>
</CardGroup>

The complete v2 catalog (book, level3, ticker, trade, ohlc, instrument,
executions, balances, add\_order, amend\_order, cancel\_order, batch\_add,
batch\_cancel, cancel\_all, cancel\_after, ping, heartbeat, status) and
the v1 catalog (book, ticker, trade, spread, ohlc, ownTrades,
openOrders, addOrder, cancelOrder, cancelAll, systemStatus, heartbeat,
ping) are available under the **Spot WebSocket v2** and **Spot
WebSocket v1** dropdowns in the left navigation.

## Connection management

Send a `ping` at least every 60 seconds. On reconnect, resubscribe to
each channel and reconcile state — the
[reconnection guide](/exchange/guides/websockets/reconnection) walks
through resubscription, sequence handling, and book recovery.

## Related

<CardGroup cols={2}>
  <Card title="WebSocket overview" icon="bolt" href="/exchange/guides/websockets/introduction">
    Connection details, v1 vs v2, beta endpoints.
  </Card>

  <Card title="WebSocket authentication" icon="key" href="/exchange/guides/websockets/authentication">
    Token retrieval and signed challenge flow.
  </Card>

  <Card title="Book checksum (v2)" icon="check" href="/exchange/guides/websockets/book-checksum-v2">
    Validate book consistency after every update.
  </Card>

  <Card title="L3 checksum (v2)" icon="check" href="/exchange/guides/websockets/l3-checksum-v2">
    L3 order-by-order checksum logic.
  </Card>

  <Card title="Reconnection" icon="rotate" href="/exchange/guides/websockets/reconnection">
    Disconnect handling and resubscribe.
  </Card>

  <Card title="Choose your protocol" icon="code-compare" href="/exchange/guides/general/api-comparison">
    WebSocket vs FIX vs REST trade-offs.
  </Card>
</CardGroup>
