Real-time crypto price stream engine — built from raw WebSockets, zero libraries for core logic.
A live price-watching pipeline built entirely from scratch — no ethers.js-style abstraction, no event-library crutch. Every core piece (event bus, queue, worker) is hand-built to actually understand what's happening under the hood, not just import a solution.
Streams live BTC/USDT trades from Binance's public WebSocket API, decouples ingestion from processing via a custom pub/sub system, and (soon) fires alerts on configurable price thresholds.
ws-client.js— raw WebSocket connection, zero SDKevent-bus.js— hand-rolled pub/sub (on/emit), noEventEmitterimportqueue.js— buffering layer for incoming tradesworker.js— pulls from queue, processes at controlled pacealert-engine.js— threshold-based alerting
- [done] WebSocket client — live connection, parsing raw trade data
- [done] Event bus — decoupled pub/sub working end to end
- [done ] Queue — buffering layer
- [done ] Worker — controlled processing loop
- [done ] Alert engine — configurable price thresholds
npm install
node src/index.jsBuilt to actually understand async iteration, closures, event-driven architecture, and backpressure handling — not to ship a product. Every piece here could be replaced by a library in five minutes; the point is knowing exactly what that library would be doing.