
Product
Rust Support in Socket Is Now Generally Available
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.
@bitfinex/lib-js-util-math
Advanced tools
The lib includes the utilities depicted below:
BN - BigNumber utilitiesArray utilites - Array utilites like min, max, median and avg with big number manipulationVWAP - Volume Weighted Average Price (VWAP) index utilitiesStandard Deviation - Standard deviation utilitiesSMA - Simple Moving AverageEMA - Exponential Moving AverageTWAP - Time Weighted Average Price utilitiesImpact mid price - Mid price from bids and asks until specific book depthnpm install --save https://github.com/bitfinexcom/lib-js-util-math.git
npm run test
const data = [
{ price: nBN(10500), y: 'jan', volume: '1' },
{ price: nBN(10700), y: 'feb', volume: '0.33' },
{ price: nBN(11500), y: 'mar', volume: '2.13' },
{ price: nBN('12300'), y: 'apr', volume: '5.26' },
{ price: nBN(5000), y: 'may', volume: '0.77' },
{ price: nBN(5100), y: 'jun', volume: '1.52' }
]
const vwap = VWAP(data)
console.log(vwap) // 10429.24613987284287011807
const dev = stdDeviation(data, a => a.price)
console.log(dev.toFixed()) // 2980.16591633568094682823
FAQs
Bitfinex JS Math Lib
We found that @bitfinex/lib-js-util-math demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.

Research
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.