Skip to main content

tracer.options.klines#

Per-instrument options OHLCV from /api/v1/options/klines.

SYNTAX#

tracer.options.klines: SourceHandle  // Per-instrument options OHLCV (series)

ARGUMENTS#

  • opts.symbol (string) — Options instrument symbol.
  • opts.interval (string) — Bar interval.

RETURNS#

GenericSeriesSourceData — { values: { time, o, h, l, c, v } }

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.c[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 ok = tracer.options.klines;
function onBar(i, ctx) {
  // generic series: match by timestamp, not bar index (see REMARKS)
  const j = ok.values.time.lastIndexOf(candles[i].time);
  plot("opt_close", j >= 0 ? ok.values.c[j] : null);
}