tracer.aggregated.volume#
Summed cross-venue volume bucketed at 1h+ resolution.
SYNTAX#
tracer.aggregated.volume: SourceHandle // Cross-venue SUM of bucketed volume (USD)ARGUMENTS#
opts.symbol(string) — Trading pair (default: chart symbol).opts.interval('1h' | '4h' | '1d') — Volume bucket size — limited to 1h+ resolution.opts.market('perp' | 'spot') — Default 'perp'. Set 'spot' for spot-venue aggregate.
RETURNS#
GenericSeriesSourceData — { kind: 'aggregated-volume', shape: 'series', values: { time: number[], volume: 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.volume[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: "Volume Cross-Venue", pane: "sub" }
const av = tracer.aggregated.volume;
// Or: source("aggregated-volume", { market: "spot" })
function onBar(i, ctx) {
// generic series: match by timestamp, not bar index (see REMARKS)
const t = candles[i].time;
const j = av.values.time.lastIndexOf(t); // exact ts; else scan for nearest ts <= t
plot.histogram("volume_usd", j >= 0 ? av.values.volume[j] : null);
}