velo-node
v1.5.4
Published
Node.js library for Velo API access
Downloads
63
Readme
velo-node
NodeJS library for Velo API access. See full documentation here.
Install
npm install velo-node
Usage
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()
License
Copyright 2024 Velo Data, license MIT