Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

ETHUSDT · Live 1s Chart

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.

Architecture

  • 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:
    1. 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),
    2. serves recent history via GET /api/history,
    3. exposes GET /api/health for monitoring,
    4. relays every 1-second kline to all connected browser clients over a local WebSocket at /ws.

The relay pattern means the browser only ever talks to the local server, so the chart works regardless of geo-blocks at the client.

Run locally

Requires Bun.

bun install          # install deps (lightweight-charts is imported via esm.sh, no install needed)
PORT=5173 bun run server.ts

Then open http://localhost:5173/.

Deploy

The service is also deployed as a managed user service on doctopmail.zo.computer.

Why 1-second candles?

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.

About

Live ETHUSDT 1s candlestick chart from Binance

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages