Types
Interfaces and type aliases exported by @reincharts/datafeed.
import type { AlignOptions, AlignSeriesOptions, Bar, ... } from "@reincharts/datafeed";AlignOptions
Options for calendar alignment of bars.
Prop
Type
AlignSeriesOptions
Options of alignSeries.
Prop
Type
Bar
One OHLCV bar. time is the bar open time in milliseconds since the Unix epoch (UTC).
Prop
Type
ChartBar
A bar ready for <ChartCanvas data>: date makes the chart detect a time axis automatically.
Prop
Type
CsvBar
A parsed CSV / TSV row: OHLCV plus any extra column (numbers when numeric, strings otherwise).
type CsvBar = Bar & { [column: string]: number | string | undefined };Datafeed
The adapter between your backend and the chart: history requests, realtime updates and symbol search.
Only getBars is required.
Prop
Type
GetBarsRequest
History request: bars with from <= time < to, at least the countBack most recent ones before to.
Prop
Type
GetBarsResult
History response.
Prop
Type
MemoryDatafeed
A Datafeed over in-memory arrays, with pushBar to simulate realtime updates.
Prop
Type
MemoryDatafeedOptions
Options of createMemoryDatafeed.
Prop
Type
ParseCsvOptions
Options of parseCsv.
Prop
Type
ParsedResolution
A parsed resolution: count × unit (hours are expressed as minutes, years as months).
Prop
Type
RandomDatafeed
A demo Datafeed with deterministic history and a simulated realtime ticker.
Prop
Type
RandomDatafeedOptions
Options of createRandomDatafeed.
Prop
Type
Resolution
Bar interval in the common charting notation: "1S"/"5S" seconds, "1"/"5"/"15"/"60"/"240" minutes, "1D" days, "1W" weeks, "1M" months. Friendly aliases are accepted too: "1s", "1m", "1h", "4h", "1d", "1w", "1y".
type Resolution =
| "1S"
| "5S"
| "15S"
| "30S"
| "1"
| "3"
| "5"
| "15"
| "30"
| "45"
| "60"
| "120"
| "180"
| "240"
| "1D"
| "1W"
| "1M"
| "3M"
| "6M"
| "12M"
| (string & {});ResolutionUnit
type ResolutionUnit = "second" | "minute" | "day" | "week" | "month";SymbolInfo
Instrument metadata .
Prop
Type
Tick
A single trade / price update.
Prop
Type