WebSocket subscription
A WebSocket subscription is a long-lived connection to a node through which the client subscribes to a stream — new heads, pending transactions or logs — and receives events pushed as they happen.
Polling wastes calls and adds latency; a WebSocket subscription flips the model so the node pushes updates the moment they occur. Common streams are newHeads for each block, logs matching a filter, and pending transactions. This suits live dashboards and payment detection that need the chain tip without repeated requests. Subscriptions cover the live edge; for backfilling missed history you still page through eth_getLogs against the archive RPC, so most systems combine a live stream with archive queries.
Related terms
Turn the concept into an API call
Every term here maps to a primitive you can call today — top up credits and ship.
Get API key