Skip to content
Velo

marketCaps.history

Builds an immutable, validated request for the latest supply and market-cap data. No request is sent until the builder is passed to velo.query() or iteration begins through velo.stream().

Imports

import { Velo } from 'velo-sdk';

Examples

import { Velo, marketCaps } from 'velo-sdk';
 
const velo = new Velo({ apiKey: process.env.VELO_API_KEY! });
 
const caps = await velo.query(
  marketCaps.history({ coins: ['BTC', 'ETH'] }),
);

Definition

function history(
  params: MarketCapsParams,
): MarketCapsHistoryBuilder;

Parameters

params

  • Type: MarketCapsParams

params.coins

  • Type: readonly string[]

One or more coin symbols.

Return Type

  • Type: MarketCapsHistoryBuilder

Returns an immutable request builder. Passing it to velo.query() resolves to MarketCap[]: an array of matching market-cap snapshots, or an empty array when no snapshots match. Passing it to velo.stream() yields MarketCap items.

MarketCap

PropertyTypeDescription
coinstringThe Velo-normalized coin symbol.
timenumberSnapshot time as a Unix timestamp in milliseconds.
circ`numbernull`
circ_dollars`numbernull`
fdv`numbernull`
fdv_dollars`numbernull`