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,
};| Field | Markets | Description |
|---|---|---|
exchange | All | The exchange and market type that the product belongs to |
coin | All | Velo's aggregated and normalized symbol |
product | All | The product symbol, the symbol used at an exchange |
begin | All | First available timestamp, in Unix milliseconds |
depth | Futures | Whether orderbook depth data is available for the futures product |
end | Delisted futures and spot | Last 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());