← All use cases

Trading Platform Charts

Build professional trading interfaces with Chart.ts. Real-time candlestick charts, technical indicators (SMA, EMA, RSI, MACD, Bollinger Bands), volume analysis, and WebSocket streaming for live market data. Under 15kb with the full @chartts/finance plugin.

Example Implementation

dashboard.tsx
import { CandlestickChart, VolumeChart, LineChart } from "@chartts/react"
import { sma, bollingerBands } from "@chartts/finance"
import { useWebSocket } from "@chartts/websocket"

export function TradingTerminal({ symbol }) {
  const { data, status } = useWebSocket(`wss://feed.example.com/${symbol}`)
  const sma20 = sma(data, { period: 20, field: "close" })
  const bands = bollingerBands(data, { period: 20, stdDev: 2 })

  return (
    <div className="grid grid-rows-[3fr_1fr] gap-1 h-[600px]">
      <div className="rounded-xl card p-4">
        <CandlestickChart
          data={data}
          x="timestamp"
          open="open" high="high" low="low" close="close"
          overlays={[
            { data: sma20, className: "stroke-amber-400" },
            { data: bands.upper, className: "stroke-zinc-500" },
            { data: bands.lower, className: "stroke-zinc-500" },
          ]}
          className="h-full"
          upClassName="fill-emerald-500"
          downClassName="fill-red-500"
          crosshair
          zoomPan
        />
      </div>
      <div className="rounded-xl card p-4">
        <VolumeChart
          data={data}
          x="timestamp"
          y="volume"
          direction="close"
          className="h-full"
          upClassName="fill-emerald-500/60"
          downClassName="fill-red-500/60"
        />
      </div>
    </div>
  )
}

Why Chart.ts for Trading Platform

Professional candlestick and OHLC charts with sub-millisecond rendering
Built-in technical indicators: SMA, EMA, RSI, MACD, Bollinger Bands
Real-time WebSocket streaming with auto-reconnect
Kagi and renko reversal charts for advanced traders
Multi-panel linked charts with synchronized crosshair
Zoom and pan for exploring price history
Dark mode optimized for trading terminals
Free and open source (MIT) vs $590/yr for Highcharts Stock

Start building your trading platform

Install Chart.ts and have your first chart rendering in 2 minutes.

$npm install @chartts/react