Skip to main content
Every stream returns { stop() } and reconnects on its own after 0.5, 1, 2, 5 and then every 10 seconds, subscribing again after each reconnect. All streams of one client share one gateway connection. Pass an error handler as the last argument to hear about a refused key: the streams stop and the handler receives GatewayAuthError. A fill:
On Node 20, which has no global WebSocket, pass one: new Zeus({ ..., streams: { webSocket: WebSocket } }) with import WebSocket from 'ws'.