Receive streams from Binance endpoint with Websockex.
Start/stop the WebSockex GenServer on-the-fly.
Start the "moving-average" GenServer calculator on mount.
Render:
- statistics:
- instant price via
@streams - moving average over 5s
- trend with dynamic SVG
- instant price via
- SSR rendered SVG chart with
contExof the moving average. The whole SVg is send over the LiveSocket but LiveView renderes only the changes - CSR rendered chart in Canvas with
lightweight-chartsof the moving average. Only the last tuple[time, value]is sent. 150.65 kB - CSR rendered chart in Canvas with
uPlotof the moving average. Only the last tuple[time, value]is sent. 52.69 kB uncompressed.
Note: app.js is 124.12 kB uncompressed.