Skip to content
Velo

Getting Started

1. Install

Install Velo's TypeScript SDK

2. API Key

Before you can make a request, you need a Velo API key. Here are details on getting an API key:

  • Velo API keys are available at $199/mo.
  • Subscriptions are payable monthly (3 month history) or yearly (full data history).
  • Please see the pricing page in the web app to get a key or send us an email to support@velo.xyz to request a trial.

3. Making a request

Describe the request with the fluent builder or as a typed request object, then execute it with velo.query().

import { Velo, futures } from 'velo-sdk';
 
const velo = new Velo({ apiKey: process.env.VELO_API_KEY! });
const data = await velo.query(
  futures
    .price()
    .volume(['total'])
    .for({
      exchanges: ['binance-futures', 'bybit'],
      coins: ['BTC'],
    })
    .over({
      last: '1h',
      resolution: '1m',
    }),
);
 
console.log(data.columns());

To receive rows one at a time instead of collecting them, use velo.stream() with the same request:

for await (const row of velo.stream(request)) {
  console.log(row.close_price);
}