Skip to main content

Connect to premium websockets

01 - Access your premium websocket (wss) endpoint

Copy your wss endpoint from the Premium Plan page.


Premium websockets are of the following format:

Arbitrum wss://<YOUR_API_KEY>

Avalanche wss://<YOUR_API_KEY>

BNB Chain wss://<YOUR_API_KEY>

Celo wss://<YOUR_API_KEY>

Ethereum wss://<YOUR_API_KEY>

Fantom wss://<YOUR_API_KEY>

Polygon wss://<YOUR_API_KEY>

Solana wss://<YOUR_API_KEY>

02 - Test with wscat

The easiest way to test out your websocket endpoint is to install a command line tool such as wscat

Use wscat to send Curl requests as in the Curl example below

03 - Websocket endpoint examples

wscat -c wss://`

Connected (press CTRL+C to quit)

> {"jsonrpc": "2.0", "id": 1, "method": "eth_subscribe", "params": ["newHeads"]}

> {"jsonrpc": "2.0", "id": 2, "method": "eth_unsubscribe", "params": ["The result value returned after successful subscription"]}