Terminal app that streams live price data from Binance and renders it as an UTF-8 chart.
Connects to the Binance websocket kline stream for a configured symbol and interval, backfills recent history over REST on startup, keeps a rolling window of closing prices in memory, and redraws an ASCII line chart in the terminal twice a second. Reconnects automatically on dropped connections.
- Go 1.25+
Includes a custom .env parser and validator (no third-party dependency) that loads and validates configuration on startup.
Set values in .env, or as environment variables — those take precedence:
SYMBOL="ETHUSDT"
INTERVAL="1m"
BACKFILL="100"| Variable | Description | Accepted values |
|---|---|---|
SYMBOL |
Trading pair | e.g. ETHUSDT |
INTERVAL |
Kline interval | 1m 3m 5m 15m 30m 1h 2h 4h 6h 8h 12h 1d 3d 1w 1M |
BACKFILL |
Historical candles fetched on startup | 0–1000 |
make trackerOr directly:
go run ./cmd/trackerPress Ctrl+C to stop.
make testCoverage report:
make covercmd/tracker entry point
cmd/config .env loading and validation
internal ASCII chart rendering
internal/binance REST backfill and websocket client
internal/market kline model and ring buffer store
internal/tracker orchestrates the transport and serves snapshots