openkline

@rekurt/openkline-core

Framework-agnostic OHLCV (candlestick) chart library. Zero runtime dependencies. Canvas-based rendering. TypedArray buffers.

This is the core of the OpenKline monorepo. For framework wrappers see @rekurt/openkline-react and @rekurt/openkline-vue.

Install

npm install @rekurt/openkline-core

Quick start

import { OHLCVChart } from '@rekurt/openkline-core';

const chart = new OHLCVChart({
  container: document.getElementById('chart')!,
  symbol: 'BTC/USDT',
  resolution: '1H',
  theme: 'auto',       // or 'dark' | 'light'
  onError: (err) => console.error(err),
});

chart.setData([
  { o: 42000, h: 42100, l: 41900, c: 42050, v: 1_000, t: 1_700_000_000 },
  // ...
]);

Features

Status

Active development. Core rendering, data, and interaction layers are stable with extensive unit tests (450+). Sub-pane indicators (RSI, MACD, Stochastic, ATR) render in their own stacked panes via the Pane/PaneLayout abstraction. Advanced drawing tools and a larger indicator catalog are on the roadmap.

License

MIT