Skip to content
Velo

futures.over

Defines the time window to query. Choose exactly one of between or last, and select a resolution.

The .over() step is required before a request can be executed.

Imports

import { Velo } from 'velo-sdk';

Examples

const data = await velo.query(
  futures
    .price(['close'])
    .for({ coins: ['BTC'] })
    .over({
      last: '1D',
      resolution: '1h',
    }),
);

Definition

function over(scope: WindowScope): FuturesBuilder;

Parameters

scope.between / scope.last

  • Type: readonly [number | Date, number | Date] (between) or LastDuration (last)

Provide exactly one of the two.

  • between is a [begin, end) pair of Date objects or millisecond timestamps
  • last is a trailing duration in minutes, hours, days, or weeks: 30m, 2h, 3D, 1W. It is anchored when the request is executed

scope.resolution

  • Type: Resolution

Return Type

  • Type: FuturesBuilder

Returns a builder with the time window recorded. Pass it to velo.query() or velo.stream().