Trading Chart

A React candlestick chart for trading dashboards with live OHLCV data, volume, timeframe tabs, crosshair readouts, and drawing tools.

Connecting to live feed…

Props

PropertyTypeDefaultDescription
candlesCandlestickData<UTCTimestamp>[]Candles to render. Append a new entry (or replace the last) to stream live data.
volumesHistogramData<UTCTimestamp>[]Matching volumes. Omit to hide the volume pane.
dataKeystringDataset identity (e.g. `${timeframe}:${candles[0]?.time}`). A change performs a full resync instead of a last-bar update — derive it from the data so fresh history always resyncs.
symbolstring"BTC"Base asset label in the header.
quotestring"USD"Quote asset label in the header.
logoSrcstringCoin/logo image URL shown next to the symbol. Hidden when omitted.
timeframes{ id: string; label: string }[]1m, 5m, 15m, 1H, 4H, 1DTimeframe pills. Pass [] to hide the selector.
activeTimeframestringControlled active timeframe id.
defaultTimeframestringUncontrolled initial timeframe id.
onTimeframeChange(id: string) => voidCalled with the timeframe id when the user picks one.
feedStatus"live" | "connecting" | "simulated"Feed state shown as a status dot. Omit to hide the dot (static datasets).
showDrawingToolsbooleantrueShow the drawing-tools rail (trend, fib, brush, eraser, undo, clear).
drawingsDrawing[]Controlled drawings.
defaultDrawingsDrawing[]Uncontrolled initial drawings.
onDrawingsChange(drawings: Drawing[]) => voidCalled with the next drawings on every add, erase, undo, or clear.
heightnumber380Chart height in px.
classNamestringAdditional classes for the root card.