Skip to content
Velo

channels.liquidationVolume

Builds a channel for live futures buy and sell liquidation volume. Accepts a product on one exchange or a coin across exchanges. Pass it to velo.channels.feed() with a data listener to receive updates.

Imports

import { Velo } from 'velo-sdk';

Example

const velo = new Velo({ apiKey: process.env.VELO_API_KEY! });
const product = {
  exchange: 'binance-futures',
  coin: 'BTC',
  product: 'BTCUSDT',
} as const;
 
const single = velo.channels.liquidationVolume(product, { metric: 'dollars' }).on({
  data: (row) => console.log(row.time, row.buy_liquidations_dollar_volume),
  error: ({ reason }) => console.error('Channel error:', reason),
});
 
const aggregated = velo.channels.liquidationVolume({ coin: product.coin }, { metric: 'dollars' }).on({
  data: (entries) => console.table(entries),
  error: ({ reason }) => console.error('Aggregated channel error:', reason),
});
 
const watcher = await velo.watch(velo.channels.feed([single, aggregated]), {
  on: { error: (error) => console.error('Connection error:', error) },
});
 
// Later:
watcher.close();

Definition

Simplified signature. The SDK infers the returned channel's data type from the target and options.

function liquidationVolume(
  target: Target<FuturesExchange>,
  options?: { readonly metric?: 'coins' | 'dollars' },
): Channel;

Parameters

target

  • Type: Target<FuturesExchange>
  • Required

A futures product with exchange, coin, and product, as returned by the catalog. Pass { coin } on its own for an aggregated channel across futures exchanges.

options

PropertyTypeDefaultDescription
metric'coins' | 'dollars''dollars'Units for the returned values.

Channel metrics use the plural coins and dollars; historical selectors use coin and dollar.

Return Type

  • Type: Channel

Returns a channel typed with the selected target and options.

MetricFields
coinsbuy_liquidations_coin_volume, sell_liquidations_coin_volume
dollarsbuy_liquidations_dollar_volume, sell_liquidations_dollar_volume
{
  "exchange": "binance-futures",
  "coin": "BTC",
  "product": "BTCUSDT",
  "time": 1785160560000,
  "buy_liquidations_dollar_volume": 150000,
  "sell_liquidations_dollar_volume": 250000
}