tracer.aggregated.oi#
SUMMED cross-venue open interest (NOT max — sum is the additive total of contracts outstanding across venues).
SYNTAX#
tracer.aggregated.oi: SourceHandle // Cross-venue SUM of open interestARGUMENTS#
opts.symbol(string) — Trading pair (default: chart symbol).opts.interval(string) — Bucket interval (5m/15m/30m/1h/4h/1d). Default: chart interval.opts.from(number) — Window start, Unix-ms (REQUIRED).opts.to(number) — Window end, Unix-ms (REQUIRED).
RETURNS#
GenericSeriesSourceData — { kind: 'aggregated-oi', shape: 'series', values: { time: number[], oi: number[], oi_usd: number[] } }REMARKS#
Generic series — rows arrive at the source's native cadence and are NOT 1:1 with chart candles. To align, match values.time[i] (unix SECONDS) against candles[j].time; do not assume row i corresponds to bar i (values.oi_usd[i] is generally NOT bar i's value). (Per-candle kinds like oi/funding are the exception — those are forward-filled to your candles.)
EXAMPLE#
// @indicator { name: "Total OI", pane: "sub" }
const aoi = tracer.aggregated.oi;
function onBar(i, ctx) {
// generic series: match by timestamp, not bar index (see REMARKS)
const t = candles[i].time;
const j = aoi.values.time.lastIndexOf(t); // exact ts; else scan for nearest ts <= t
plot("total_oi_usd", j >= 0 ? aoi.values.oi_usd[j] : null);
}