Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

vwap

miguelmota568MIT0.0.2

Calculate the Volume-Weighted Average Price (VWAP)

vwap, volume, weighted, average, math, price, crypto, cryptocurrencies, chart, formula, exchanges

readme

vwap

Calculate the Volume-Weighted Average Price (VWAP)

Install

npm install vwap

Usage

const vwap = require('vwap')

// input: [[volume, price], [volume, price], ...]
const p = vwap([[5, 10], [13, 8.5], [10, 11]])

console.log(p) // 9.660714285714286

Test

npm test

License

MIT