Skip to content
Velo

options.gamma

Adds an options gamma column to an immutable query builder. Calling .gamma() without arguments selects dollar gamma.

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
    .gamma({ metric: 'coin' })
    .for({
      coins: ['BTC'],
    })
    .over({
      last: '1D',
      resolution: '1h',
    }),
);
 
const rows = data.rows();

Definition

function gamma(): OptionsBuilder<C | OptionsGammaColumn<'dollar'>>;
 
function gamma<M extends OptionsGammaMetric>(
  options: { readonly metric: M },
): OptionsBuilder<C | OptionsGammaColumn<M>>;

Parameters

options

  • Type: { readonly metric: 'coin' | 'dollar' }
  • Optional
  • Default: { metric: 'dollar' }

Selects whether gamma is measured in coins or dollars.

Return Type

  • Type: OptionsBuilder<C | OptionsGammaColumn<M>>

Returns a builder typed with the accumulated columns.