Skip to main content

tracer.data.footprint#

Per-bar level-by-price footprint from /api/v1/perp/footprint.

SYNTAX#

tracer.data.footprint: SourceHandle  // Per-bar level-by-price footprint deltas

ARGUMENTS#

  • opts.symbol (string) — Trading pair.
  • opts.exchange (string) — Exchange.
  • opts.interval (string) — Bucket interval.

RETURNS#

GenericSeriesSourceData — { kind: 'footprint', shape: 'series', values: { time (seconds), delta, buy_volume, sell_volume, total_volume } }

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.delta[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: "Footprint Delta", pane: "sub" }
const fp = tracer.data.footprint;
function onBar(i, ctx) {
  // generic series: match by timestamp, not bar index (see REMARKS)
  const t = candles[i].time; // candles[].time and fp.values.time are both unix SECONDS here
  const j = fp.values.time.lastIndexOf(t); // exact ts; else scan for nearest ts <= t
  plot.histogram("delta", j >= 0 ? fp.values.delta[j] : null);
}