Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bfx-api-node-models

Package Overview
Dependencies
Maintainers
1
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bfx-api-node-models - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

11

lib/funding_ticker.js

@@ -13,14 +13,14 @@ 'use strict'

const {
symbol, frr, bid, bidPeriod, bidSize, ask, askPeriod, askSize,
frr, bid, bidPeriod, bidSize, ask, askPeriod, askSize,
dailyChange, dailyChangePerc, lastPrice, volume, high, low
} = this
return [symbol, [
return [
frr, bid, bidPeriod, bidSize, ask, askPeriod, askSize, dailyChange,
dailyChangePerc, lastPrice, volume, high, low
]]
]
}
static unserialize (arr) {
const [ symbol, data ] = arr
const [ data ] = arr
const [

@@ -31,6 +31,5 @@ frr, bid, bidPeriod, bidSize, ask, askPeriod, askSize, dailyChange,

? data
: [...arr].splice(1)
: [...arr].splice(0)
return {
symbol,
frr,

@@ -37,0 +36,0 @@ bid,

@@ -13,14 +13,14 @@ 'use strict'

const {
symbol, bid, bidSize, ask, askSize, dailyChange, dailyChangePerc,
bid, bidSize, ask, askSize, dailyChange, dailyChangePerc,
lastPrice, volume, high, low
} = this
return [symbol, [
return [
bid, bidSize, ask, askSize, dailyChange, dailyChangePerc, lastPrice,
volume, high, low
]]
]
}
static unserialize (arr) {
const [ symbol, data ] = arr
const [ data ] = arr
const [

@@ -31,6 +31,5 @@ bid, bidSize, ask, askSize, dailyChange, dailyChangePerc, lastPrice,

? data
: [...arr].splice(1)
: [...arr].splice(0)
return {
symbol,
bid,

@@ -37,0 +36,0 @@ bidSize,

{
"name": "bfx-api-node-models",
"version": "1.0.2",
"version": "1.0.3",
"description": "Object models for usage with the Bitfinex node API",

@@ -5,0 +5,0 @@ "engines": {

@@ -7,3 +7,3 @@ /* eslint-env mocha */

const DATA = ['fUSD', [
const DATA = [
0.00009351,

@@ -22,3 +22,3 @@ 0.00009526,

2.7e-7
]]
]

@@ -29,3 +29,2 @@ describe('FundingTicker model', () => {

assert.equal(ticker.symbol, 'fUSD')
assert.equal(ticker.frr, 0.00009351)

@@ -56,3 +55,2 @@ assert.equal(ticker.bid, 0.00009526)

assert.equal(obj.symbol, 'fUSD')
assert.equal(obj.frr, 0.00009351)

@@ -59,0 +57,0 @@ assert.equal(obj.bid, 0.00009526)

@@ -7,3 +7,3 @@ /* eslint-env mocha */

const DATA = ['tETHUSD', [
const DATA = [
228.56,

@@ -19,3 +19,3 @@ 430.1902224,

211.19
]]
]

@@ -26,3 +26,2 @@ describe('TradingTicker model', () => {

assert.equal(ticker.symbol, 'tETHUSD')
assert.equal(ticker.bid, 228.56)

@@ -50,3 +49,2 @@ assert.equal(ticker.bidSize, 430.1902224)

assert.equal(obj.symbol, 'tETHUSD')
assert.equal(obj.bid, 228.56)

@@ -53,0 +51,0 @@ assert.equal(obj.bidSize, 430.1902224)

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc