eth_subscribe / eth_unsubscribe protocol. This lets you receive pushed notifications — like new blocks or contract logs — without polling.
Connecting
Connect to the WebSocket URL with your API key in the path (same keys you use for HTTP RPC):X-WebSocket-Session-ID header you can use for debugging.
The handshake validates your API key, origin, and credit balance before the socket is upgraded. Common handshake failures return an HTTP status before upgrade:
- 402 — Insufficient credits
- 429 — Service draining or too many concurrent connections from your IP (a
Retry-Afterheader tells you when to retry) - 503 — All connection slots are currently in use
- 401 — Unauthorized (invalid or inactive API key)
Subscribing and receiving notifications
To subscribe, sendeth_subscribe with a subscription type:
eth_subscription messages:
eth_unsubscribe with the subscription ID.
Supported subscription types and pricing
The available subscription types (and their prices) can change as we add chains and providers, so instead of a static list use the live endpoints:GET /pricing/ws— current WebSocket notification prices per chain and subscription type (price per million notifications)GET /chains/ws— the chains currently supported over WebSocket
Reliability
RouteMesh runs WebSocket streams with the same redundancy we apply to HTTP RPC:- Seamless provider failover — if the upstream node behind your subscription goes down, RouteMesh transparently reconnects to an alternate provider while keeping your connection alive. You don’t need to re-subscribe.
- Gap backfill and deduplication — when we fail over to an alternate provider, we replay any notifications missed during the switch, drop duplicate events, and keep the stream in order, so you don’t lose data while connected.

