Functions
Data
13 names in this group.
Each comes with its signature and an example.
open
Open price per bar
const open: Serieshigh
High price per bar
const high: Serieslow
Low price per bar
const low: Seriesclose
Close per bar (the current bar: the latest price)
const close: Seriesvolume
Volume per bar
const volume: Seriestime
Bar open time (UTC milliseconds)
const time: Serieshl2
(high + low) / 2
const hl2: Serieshlc3
(high + low + close) / 3
const hlc3: Seriesohlc4
(open + high + low + close) / 4
const ohlc4: Serieshlcc4
(high + low + 2 × close) / 4
const hlcc4: Seriesturnover
Value traded per bar (where the exchange gives it, else NaN)
const turnover: Seriesrequest.bars
Bars of another timeframe or symbol, lined up with this chart’s bars. A bar is seen only once it has closed by the chart bar’s close (no look-ahead): on an hourly chart, the daily value changes after the day ends. To calculate on those bars use compute: d.compute((b) => b.ta.ema(b.close, 20)) is the daily 20 EMA. Up to 4
bars(o: { symbol?: string; timeframe?: Timeframe }): { open: Series; high: Series; low: Series; close: Series; volume: Series; time: Series; compute<T extends Series | Record<string, Series>>(fn: (b: RequestedBars) => T): T }const d = request.bars({ timeframe: '1D' })request.data
Market data lined up with this chart’s bars: funding (%), openInterest ($M), longShortRatio / topLongShortRatio, kimchiPremium (%), cvd, fearGreed (0–100), coinbasePremium (%), dvol, stablecoins ($B). Mostly for Binance futures symbols. Up to 8
data(name: DataName, o?: { symbol?: string }): Seriesconst f = request.data('funding')