// project 05 - teardown

Crypto trading bot — order & chart UI

A real-time interface over live money — BTC and ETH price charts with the trader's open orders plotted on the same axes, everything arriving over WebSockets instead of a poll. Built entirely in vanilla JS, no framework.

Role

Front-End Engineer

Stack

Vanilla JS · Chart.js · WebSockets

Strategies

Fixed-step grid · Fibonacci

Notable

Visualization layer over real trades

Vanilla JS
Chart.js
WebSockets
Order reconciliation
Real-time data
01

Chart & open orders

Grid bot — live
Live· WS connected
$61,800
$62,150
$63,400
$65,100
$66,200
$66,700
$64,281 3.6%
Order strategy
Open orders
$66,200SELL
$65,100SELL
$63,400BUY

ws: order #4471 filled — BUY $63,400

ws: replacement placed — BUY $61,900

ws: price tick — $64,281

02

Fill reconciliation

01
Order fills
On the live exchange
02
WS event arrives
Backend pushes the fill
03
Chart reconciles
Closed order drops, replacement opens
03

Build notes

No framework, by choice

Chart rendering, order-line overlays, and WebSocket state were all managed in plain JS — no React, no Vue, just direct DOM and canvas control.

Orders on the price axis

Open orders were drawn as lines on the same chart as price, not a separate list — where an order sat relative to price was the whole point.

Two placement strategies

Fixed-step grids spaced orders at even intervals; Fibonacci spacing placed them at retracement levels — both computed client-side before syncing to the backend.

Start it and walk away

A trader defines the setup once — pair, spacing, range — and starts the bot; from there it runs unattended, automatically reopening a replacement order at the next level every time one fills.

The UI was never the source of truth

Orders drawn here synced to a backend that placed them on the real exchange — every reconciliation had to match what actually happened with real money.