---
title: "WebSocket upgrade endpoint."
method: GET
path: "/websocket"
tags: ["WebSocket"]
---

# WebSocket upgrade endpoint.

`GET /websocket`

Connect with a WebSocket client and exchange JSON messages using the
WsRequest/WsResponse schemas. The endpoint can also be explored through
/test-websocket.html on a Blockbook instance.

During a backend reorg, new-block notifications can contain a block
hash at the same or even smaller height.

Load estimate: Variable; idle connections are low, request methods
cost roughly like their REST equivalents, and subscriptions grow with
connection count, subscribed addresses, and event frequency.

## Other responses

- `101` — WebSocket protocol upgrade.
- `400` — Bad WebSocket upgrade request.

---

[API](https://skmtc.dev/trezor/apis/blockbook-api.md) · [All operations](https://skmtc.dev/trezor/apis/blockbook-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/trezor/blockbook-api/revisions/01c375da86bc/schema)
