Skip to content
Velo

options.notional

Adds call and put notional columns to an immutable query builder. Calling .notional() without arguments selects both sides.

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

Definition

function notional(): OptionsBuilder<C | OptionsNotionalColumn>;
 
function notional<P extends OptionsNotionalPart>(
  parts: readonly P[],
): OptionsBuilder<C | OptionsNotionalColumn<P>>;

Parameters

parts

  • Type: readonly OptionsNotionalPart[]
  • Optional
  • Default: ['call', 'put']
PartSelected column
callcall_notional
putput_notional

Return Type

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

Returns a builder typed with the accumulated columns.