Market data (feed.*)
Read order flow, derivatives and liquidations, one value per bar of your chart, with history. Funding and open interest come from up to 11 crypto exchanges. Liquidations come from 5. Each read returns a Series like close, so ta.*, plot() and s[1] all work.
// Order flow, derivatives and liquidations per bar, aligned to the chart
// like security(). Each read is a Series: it works in ta.* and plot().
export default indicator('Flow dashboard', { placement: 'subpane' }, () => {
const of = feed.orderFlow(); // the chart's symbol
plotHist(of.delta, { title: 'Delta', color: 'rgba(41,98,255,0.5)' });
plot(of.cvd, { title: 'CVD', width: 2 });
const oi = feed.openInterest(); // total across venues
const hlFunding = feed.funding({ venue: 'Hyperliquid' });
const ethLiq = feed.liquidations({ symbol: 'ETHUSDT' });
// Missing data is NaN (na), never an error. Check status to branch:
if (feed.funding().status === 'unavailable') { /* not a recorded symbol */ }
// The order book is a live snapshot, not a series.
const book = feed.orderBook();
const tilt = book.imbalance(0.5); // -1..1 within 0.5% of mid
});feed.* reference
feed.orderFlow(opts?)Aggressor buy and sell volume per bar (USD), from the merged spot tape of Binance.US, Coinbase, OKX, Kraken, Bitfinex and Bitstamp. delta = buy - sell; cvd adds delta up from the first bar with data. Up to 400 days of history.
Returns{ buyVolume, sellVolume, volume, delta, cvd, status }
plot(feed.orderFlow().cvd);feed.footprint(opts?)Per-bar footprint: point of control, delta, and the buy/sell volume at each price (levels(0) = current bar, each level has price, buyVolume, sellVolume, imbalance). Last 3 days.
Returns{ poc, delta, levels(barsBack?), status }
plot(feed.footprint().poc, { color: '#f5a623' });feed.funding(opts?)Perpetual funding per bar, normalised to 8 hours as a fraction (0.0001 = 0.01%). Default: open-interest-weighted across venues.
ReturnsSeries
plot(feed.funding().mul(10000), { title: 'Funding bp' });feed.openInterest(opts?)Open interest per bar in USD (the bar's closing value). Default: total across venues.
ReturnsSeries
feed.longShortRatio(opts?)Long accounts divided by short accounts per bar (1.5 = 60% long). Aggregate only.
ReturnsSeries
feed.liquidations(opts?)Liquidated position volume per bar in USD. long = longs liquidated (forced selling), short = shorts liquidated (forced buying).
Returns{ long, short, total, status }
feed.orderBook(opts?)The live order book right now, merged across venues. A snapshot, not a series. opts.levels sets levels per side (default 50, max 200).
Returns{ bids, asks, bestBid, bestAsk, mid, spread, depth(pct?, side?), imbalance(pct?), status }
opts: { symbol?, venue? }symbol: another symbol such as 'ETHUSDT' (default: the chart's). venue: 'all' (default, the aggregate) or one exchange. Derivatives venues: OKX, Bitget, Gate.io, HTX, KuCoin, MEXC, Hyperliquid, Deribit, dYdX, Kraken, Coinbase INTX. Liquidation venues: OKX, BitMEX, Deribit, Gate.io, HTX (one venue covers the last 24 hours). Order flow is always the aggregate.
CoverageCrypto majors: BTC, ETH, SOL, XRP, DOGE, ADA, LINK, AVAX. Charts of 1 minute and up. Other symbols read NaN with status 'unavailable'. Backtests and scans have no market data: these reads are NaN there.
feed.macro(seriesId, opts?)A US economic series from FRED by id (DGS10 10Y yield, DGS2, T10Y2Y, DFF, CPIAUCSL, UNRATE, M2SL, DTWEXBGS, VIXCLS, or any other FRED id), on any chart. Each value shows from its observation date and holds until the next one, so no bar sees its future. FRED dates a month by its first day; opts.delayDays shows values only after they were published (e.g. 14 for CPI).
ReturnsSeries
plot(feed.macro('DGS10'), { title: 'US 10Y %' });feed.options(opts?)Deribit BTC or ETH options (opts.currency, default 'BTC'), on any chart. IV in vol points. dvol (the 30-day implied vol index) has full history; the other fields come from daily snapshots ChartLabs records plus the live value on the current bar.
Returns{ atmIv, riskReversal25, butterfly25, putCallOi, dvol, status }
plot(feed.options().riskReversal25, { title: '25d RR' });feed.prediction(marketId, opts?)A Polymarket market's outcome probability (0 to 1) per bar: the last price at or before each bar's end. marketId is the numeric id, condition id or URL slug; opts.outcome picks the outcome by name or index (default the first).
ReturnsSeries
plot(feed.prediction('fed-cut-december').mul(100));Two ready-made examples are in the Template Library under Microstructure: Funding + OI Divergence and CVD with Liquidation Spikes. For macro and options data, see Macro overlay: US 10Y yield vs price (under Trend) and BTC options skew (under Volatility).