← Back to Discover

OpenKline

OpenKline is a TypeScript charting library that renders realtime OHLCV candlestick charts for trading applications under the MIT license.

Libraries & SDKs

What it does

Install OpenKline with npm install @rekurt/openkline-core. The application creates an OHLCVChart in a container element. The application passes candle data to the chart with setData. Indicators are config objects passed to setIndicatorConfigs, and the core reconciles them. The application connects historical candles and streaming updates through its own data source. To connect a data source, implement the DataTransport interface, which has four methods. Polling, WebSocket and REST all work as sources. Data access and provider credentials stay under application control. Drawings are anchored to candles. The saveLayoutState method serializes chart settings and drawings, and the loadState method restores them. The core is framework-agnostic. React and Vue wrappers are available.

Capabilities

  • The core includes 24 built-in indicators, including overlays such as SMA, Ichimoku, Supertrend and anchored VWAP, and sub-pane indicators such as RSI, MACD and Stochastic.
  • The chart has 9 drawing tools, including trend lines, Fibonacci and channels, which are anchored in buffer space.
  • The chart renders on canvas using Float64Array buffers.
  • The chart supports O(1) append and updateLast, a three-layer canvas for separate crosshair redraws, and RAF-coalesced ticks.
  • Chart types include candles, line, area, OHLC bars and Heikin-Ashi.

When to use it

  • Use it for trading interfaces, market dashboards and prototypes that need programmable OHLCV charts.
  • Use it when you need to prototype with candles and indicators in an existing React, Vue or TypeScript application.
  • Use it when you need source access to review, customize and distribute the chart with your product.