Introduction

DEPLOY nodes support WebSocket endpoints for Pub/Sub APIs and JSON-RPC filter support as well as the regular JSON-RPC API.


Usage

DEPLOY WebSockets are supported on all clients that natively support WebSocket connections. Your node's WebSocket endpoint is available by clicking Connect to Node in your node detail view. Simply use this wscat command into your WebSocket-capable client to access your chain daemon.


A Shared Ethereum node's Connect to Node modal




WebSocket Authentication Example (Parity)


First off, make sure you have wscat installed already. If you don't have it installed, you can run the following npm command.

npm install -g wscat

Open WebSocket connection

wscat -c wss://shared-parity-mainnet.nodes.deploy.radar.tech/ws?apikey=YOUR_API_KEY

Initiate Subscription: 

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





Authentication

Your Owned Node or Shared Node subscription will require the use of an API Key to authenticate your request against your subscription. Simply include the  apikey GET parameter with your WebSocket connections as illustrated in your node’s Connect to Node modal example.



Client-Specific WebSocket Documentation


Geth

https://github.com/ethereum/go-ethereum/wiki/RPC-PUB-SUB


Parity

https://wiki.parity.io/JSONRPC-eth_pubsub-module.html


BTCD

https://github.com/btcsuite/btcd/blob/master/docs/json_rpc_api.md