Skip to content
Velo

options.dvol

Adds Deribit's implied-volatility index OHLC columns to an immutable query builder. Calling .dvol() without arguments selects all four values.

Imports

import { Velo } from 'velo-sdk';

Examples

import { Velo, options } from 'velo-sdk';
 
const velo = new Velo({ apiKey: process.env.VELO_API_KEY! });
 
const data = await velo.query(
  options
    .dvol(['close'])
    .for({
      coins: ['BTC'],
    })
    .over({
      last: '1D',
      resolution: '1h',
    }),
);
 
const rows = data.rows();

Definition

function dvol(): OptionsBuilder<C | OptionsDvolColumn>;
 
function dvol<P extends OptionsDvolPart>(
  parts: readonly P[],
): OptionsBuilder<C | OptionsDvolColumn<P>>;

Parameters

parts

  • Type: readonly OptionsDvolPart[]
  • Optional
  • Default: ['open', 'high', 'low', 'close']
PartSelected column
opendvol_open
highdvol_high
lowdvol_low
closedvol_close

Return Type

  • Type: OptionsBuilder<C | OptionsDvolColumn<P>>

Returns a builder typed with the accumulated columns.