Skip to content
Velo

Discover Products

Most market-data requests take a coins, products, or exchanges parameter. Use the catalog endpoints to find the values these accept.

Filter a catalog by coin, product, and exchange. A coin is Velo's aggregated and normalized symbol, such as BTC. A product is the symbol used by an exchange, such as BTCUSDT.

// All futures products
const allProducts = await velo.query(catalog.futures());
 
// All BTC futures products
const btcFutures = await velo.query(
  catalog.futures({
    coin: 'BTC',
  }),
);
 
// All BTC futures products on `binance-futures`
const btcBinanceFutures = await velo.query(
  catalog.futures({
    coin: 'BTC',
    exchange: 'binance-futures',
  }),
);
 
// One exchange product from `binance-futures`
const binanceBtc = await velo.query(
  catalog.futures({
    product: 'BTCUSDT',
    exchange: 'binance-futures',
  }),
);

Filters are exact and case-insensitive. A search that has no match returns an empty array.

Product

Every entry includes its exchange, coin, and product, along with the beginning of its available history:

import type { FutureProduct } from 'velo-sdk';
 
const product: FutureProduct = {
  exchange: 'binance-futures',
  coin: 'BTC',
  product: 'BTCUSDT',
  begin: 1609459200000,
  depth: true,
};
FieldMarketsDescription
exchangeAllThe exchange and market type that the product belongs to
coinAllVelo's aggregated and normalized symbol
productAllThe product symbol, the symbol used at an exchange
beginAllFirst available timestamp, in Unix milliseconds
depthFuturesWhether orderbook depth data is available for the futures product
endDelisted futures and spotLast available timestamp, in Unix milliseconds

Example

const [product] = await velo.query(
  catalog.futures({
    product: 'BTCUSDT',
    exchange: 'binance-futures',
  }),
);
 
if (!product) {
  throw new Error('Failed to find a product');
}
 
const data = await velo.query(
  futures
    .price()
    .for({
      products: [product.product],
      exchanges: [product.exchange],
    })
    .over({
      last: '1h',
      resolution: '1m',
    }),
);
 
console.log(data.rows());