Skip to content
Velo

Getting Started

1. Install

Install Velo's Node.js SDK:

npm install velo-node

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

Create a client, select a futures product and columns, then stream the requested rows.

const velo = require('velo-node')
 
async function main() {
  const client = new velo.Client('api_key')
  const futures = await client.futures()
  const future = futures[0]
 
  const columns = client.futuresColumns()
  const twoColumns = columns.slice(0, 2)
 
  const params = {
    type: 'futures',
    columns: twoColumns,
    exchanges: [future.exchange],
    products: [future.product],
    begin: Date.now() - 1000 * 60 * 11, // 10 minutes
    end: Date.now(),
    resolution: '1m' // 1 minute
  }
 
  const rows = client.rows(params)
  for await (const row of rows) {
    console.log(row)
  }
}
 
main()