catalog.spot
Fetches the spot product catalog and optionally filters it by coin, product, or exchange. Active products are returned by default.
Imports
import { Velo } from 'velo-sdk';Examples
import { Velo, catalog } from 'velo-sdk';
const velo = new Velo({ apiKey: process.env.VELO_API_KEY! });
const products = await velo.query(
catalog.spot({
coin: 'BTC',
exchange: 'coinbase',
}),
);Definition
function spot(params?: SpotCatalogParams): SpotCatalogBuilder;Parameters
params
- Type:
SpotCatalogParams - Optional
| Property | Type | Description |
|---|---|---|
coin | string | Matches a Velo-aggregated coin symbol. |
product | string | Matches an exchange-native product symbol. |
exchange | SpotExchange | Matches a supported spot exchange. |
delisted | boolean | When true, returns the delisted-only catalog. Defaults to false. |
coin and product are mutually exclusive. All filters are exact and case-insensitive.
Return Type
- Type:
SpotCatalogBuilder
Returns an immutable request builder.
Passing it to velo.query() resolves to SpotProduct[]: an array of matching catalog products, or an empty array when no products match. Per-request timeout, retry, and abort-signal options (HttpRequestOptions) are supplied as the second argument to velo.query().
| Property | Type | Description |
|---|---|---|
exchange | SpotExchange | The exchange and spot market. |
coin | string | The Velo-aggregated coin symbol. |
product | string | The exchange-native product symbol. |
begin | number | First available timestamp in milliseconds. |
end | Optional number | Last available timestamp for a delisted product. |