NodeJS

npm install velo-node

GitHub, npm

Examples

Quick Start
const velo = require('velo-node')

async function doWork() {
  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)
  }
}

const client = new velo.Client('api_key')

doWork()

Helper Methods

  • Key status: status()

  • Supported futures: futures()

  • Supported options: options()

  • Supported spot pairs: spot()

  • Supported futures columns: futuresColumns()

  • Supported options columns: optionsColumns()

  • Supported spot columns: spotColumns()


Data Methods

Get rows

rows(params)

  • type: 'futures', 'options', or 'spot'

  • exchanges, products, coins, columns: arrays

  • begin, end: millisecond timestamps

  • resolution: minutes (integer) or resolution (string)

Asynchronously returns individual rows (Objects)

If both `coins` and `products` are specified, only `products` will be used

Get options term structure

termStructure(params)

  • coins: array

Returns Object

Latest values only

Get market caps

marketCaps(params)

  • coins: array

Returns Object

Latest values only

Last updated