v2.3.0Apache-2.0Zero dependencies

The charting enginebuilt for traders.

OpenAlgo Charts is a from-scratch HTML5 canvas charting library with no runtime dependencies. Candles, 102 indicators, 85 drawing tools, order flow and a full trading terminal, in a package small enough to load on a phone.

$npm i openalgo-charts
Loading the live BTC/USD chart
102
Indicators
85
Drawing tools
13
Chart types
0
Dependencies

What it is

Not a wrapper.An engine.

Every candle, axis, indicator and drawing is drawn by code in this repository. There is no charting library underneath it and nothing to license. You install one package and you have the whole surface, source included, under Apache-2.0.

It ships an Indian default rather than being an Indian library: IST is the timezone you get if you configure nothing, and every other market works by naming its own zone.

What you get

Everything a terminal needs

One npm install

No peer dependencies, no build step to fight and nothing to register. Point it at a function that returns bars and it draws.

102 indicators

Moving averages, oscillators, bands, volume studies and the rest, plus a documented contract for writing your own.

85 drawing tools

Trend lines, channels, Fibonacci, shapes, text and measurement, with undo, snapping and a saveable workspace.

13 chart types

Candles, bars, Heikin Ashi, Renko, Range, Point and Figure, Kagi, Line Break, area, baseline and more.

Order flow and profiles

Footprint, volume profile, TPO and market profile with delta, point of control and value area.

Bar replay

Step back through history bar by bar to test a read, with the same indicators and drawings on screen.

Trading on the chart

Order tickets, position lines and a depth ladder, for a host that wants a terminal rather than a picture.

Works on a phone

Touch panning, pinch zoom and a layout that stays usable at phone width, not a desktop chart squeezed down.

Yours to run

Apache-2.0, self-hosted, no account, no telemetry and no call home. Your data never leaves your page.

Live demos

Try it, do not take our word for it

Every chart below is the library running in your browser right now. Switch a tab and watch it redraw.

Loading demo
Loading demo
Loading demo
Loading demo

Bundle size

You load what you draw

Eight lazy modules. A page that only wants candles never downloads the drawing tools, and a chart that never opens the order book never downloads the ladder.

openalgo-chartsCandles, axes, crosshair, themes76.52 KB
/indicators102 built-in studies28.19 KB
/draw85 drawing tools and undo34.53 KB
/widgetTop bar, rail, dialogs, status line42.41 KB
/profileVolume profile, TPO, footprint14.96 KB
/transformRenko, Range, P&F, Kagi, symbol maths4.44 KB
/tradeOrder tickets and depth ladder7.61 KB
/webglGPU series rendering6.38 KB

Brotli, measured on the 2.3.0 release build. One createWidget call, which is the full terminal, loads 181.66 KB. Every tier at once is 215.04 KB.

Get started

Three steps to a chart

The only thing the engine needs from you is bars. Everything else has a default.

  1. 01

    Install the package

    npm i openalgo-charts. It has no runtime dependencies, so nothing else comes with it.

  2. 02

    Give it a container

    Any element with a width and a height. The engine measures it and repaints when it changes.

  3. 03

    Return bars from getBars

    One function, returning time, open, high, low, close and volume. That is the whole data contract.

A working chart
import { createWidget } from 'openalgo-charts/widget'

createWidget(document.getElementById('chart'), {
  symbol: 'RELIANCE',
  exchange: 'NSE',
  interval: '5m',
  feed: {
    async getBars({ symbol, interval, from, to }) {
      const r = await fetch(`/api/history?symbol=${symbol}`)
      return r.json()   // [{ time, open, high, low, close, volume }]
    },
  },
})

Add live updates later with subscribeBars, and indicators, drawings and replay by importing the tier you want.

Put a real chart in your app this afternoon

Free, open source and self-hosted. Read the source before you install it.