CCXWS is a JavaScript library providing real-time public data (ticker, trades, order books) from 37+ cryptocurrency exchanges via WebSockets. Current stable version is 0.47.0. It offers a unified event-driven interface, automatic reconnection with silent reconnection logic, and market structures compatible with CCXT for interoperability. Actively maintained with regular releases. Key differentiators include broad exchange support, standardized events, and built-in resilience.
npm install ccxwsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to connect to Binance WebSocket, subscribe to trades and L2 snapshots, and clean up after 10 seconds.
Use lowercase event names as before; the change only affected internal naming.
Replace subscribeOrderBook() calls with subscribeLevel2Snapshots() or subscribeLevel2Updates() depending on need.
Use 'l2snapshot' and 'l2update' events instead.
Use the exchange's own market ID (e.g., 'BTCUSDT' for Binance) as the 'id' field.
Set apiKey and apiSecret on the client for those exchanges.
Listen to the 'connecting' or 'connected' event to re-subscribe.
Ensure you instantiate the client: const client = new BinanceClient(); then client.on(...).
Run 'npm install ccxws' and use correct import: import { BinanceClient } from 'ccxws'.Provide market with at least id: 'BTCUSDT', base: 'BTC', quote: 'USDT'.
Check network connectivity and firewall settings. Try using a VPN if necessary.