Skip to main content

tracer.options.flow#

Per-bar options trade flow from /api/v1/options/flow — block prints, sweep detection, premium spent.

SYNTAX#

tracer.options.flow: SourceHandle  // Per-bar options flow (series)

ARGUMENTS#

  • opts.symbol (string) — Underlying.

RETURNS#

GenericSeriesSourceData.

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.net_premium[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#

const f = tracer.options.flow;
function onBar(i, ctx) {
  // generic series: match by timestamp, not bar index (see REMARKS)
  const j = f.values.time.lastIndexOf(candles[i].time);
  plot("net_prem", j >= 0 ? f.values.net_premium[j] : null);
}