Lux Docs

WebSockets

Real-time blockchain subscriptions

Connect

const ws = new WebSocket('wss://api.lux.cloud/v1/ws/lux');
ws.send(JSON.stringify({
  jsonrpc: '2.0',
  method: 'eth_subscribe',
  params: ['newHeads'],
  id: 1
}));

On this page