Use case

Real-time crypto WebSockets and WebSocket RPC

Stream live DEX pairs, perpetual order books, options, prediction markets and blockchain eth_subscribe / Solana subscriptions through one API key.

What you get

Two real-time WebSocket surfaces share the same X-Hub-Key authentication: 70+ multiplexed provider feeds under /ws/{provider}/{path} and read-only JSON-RPC WebSocket subscriptions under /ws/rpc/{chain}.

Provider WebSocket streams

WebSocket RPC (/ws/rpc/{chain})

Subscribe to live EVM blocks and filtered contract logs (eth_subscribe: newHeads, logs, syncing) or Solana slots, accounts and logs (slotSubscribe, rootSubscribe, accountSubscribe, signatureSubscribe, logsSubscribe).

wscat -H "X-Hub-Key: $API_HUB_KEY" -c "wss://openapihub.dev/ws/rpc/ethereum" \
  -x '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}'

Good to know

FAQ

How do I authenticate WebSocket connections?

Pass your key in the X-Hub-Key HTTP header during the WebSocket handshake to /ws/{provider}/{path} or /ws/rpc/{chain}.

Which chains support WebSocket RPC subscriptions?

Ethereum, Base, Arbitrum, Optimism, Polygon, BSC, Avalanche, Solana, Linea and zkSync support live JSON-RPC WebSocket subscriptions at /ws/rpc/{chain}.

See also: Streaming reference · On-chain RPC · Hyperliquid · Deribit · DexTools

Get a free key