A live, high-frequency candlestick chart for the ETH/USDT pair, fed by Binance market data on a 1-second timeframe. Time on the X axis, USDT on the Y axis, with a fixed 2-minute × ~$1.20 visible window that scrolls as new trades land.
public/— the static frontend (HTML + JS, no build step). Uses TradingView Lightweight Charts for rendering and a small client-side WebSocket connection for updates.server.ts— a small Bun server that:- keeps a single upstream WebSocket connection to Binance's
market-data-only endpoint (
data-stream.binance.vision, no geo-block and no API key required), - serves recent history via
GET /api/history, - exposes
GET /api/healthfor monitoring, - relays every 1-second kline to all connected browser clients over a
local WebSocket at
/ws.
- keeps a single upstream WebSocket connection to Binance's
market-data-only endpoint (
The relay pattern means the browser only ever talks to the local server, so the chart works regardless of geo-blocks at the client.
Requires Bun.
bun install # install deps (lightweight-charts is imported via esm.sh, no install needed)
PORT=5173 bun run server.tsThen open http://localhost:5173/.
The service is also deployed as a managed user service on doctopmail.zo.computer.
Binance exposes a public kline_1s stream, which gives a much more granular
view than the default 1-minute candles — closer to watching the order book
move. The visible window is intentionally narrow (2 minutes wide × ~$1.20
tall) so each new candle is large enough to see at a glance.