bfx-api-node-models
Advanced tools
Comparing version 1.0.12 to 1.0.13
@@ -26,4 +26,4 @@ 'use strict' | ||
static unserialize (arr) { | ||
const [ , symbol, data = [] ] = arr | ||
const [ yieldLoan, yieldLend, durationLoan, durationLend ] = data | ||
const [, symbol, data = []] = arr | ||
const [yieldLoan, yieldLend, durationLoan, durationLend] = data | ||
@@ -30,0 +30,0 @@ return { |
@@ -38,3 +38,3 @@ 'use strict' | ||
FundingLoan.status = {} | ||
FundingLoan.side = { // TODO: enquire about case sensitivity | ||
FundingLoan.side = { | ||
LEND: 'Lend', | ||
@@ -41,0 +41,0 @@ LOAN: 'Loan' |
@@ -36,3 +36,3 @@ 'use strict' | ||
FundingOffer.status = {} | ||
FundingOffer.type = { // TODO: enquire about case sensitivity | ||
FundingOffer.type = { | ||
LEND: 'lend', | ||
@@ -39,0 +39,0 @@ LOAN: 'loan' |
@@ -42,7 +42,7 @@ 'use strict' | ||
static unserialize (arr) { | ||
const [ type ] = arr | ||
const [type] = arr | ||
if (type === 'base') { | ||
const [, payload] = arr | ||
const [ userPL, userSwaps, marginBalance, marginNet ] = payload | ||
const [userPL, userSwaps, marginBalance, marginNet] = payload | ||
@@ -57,4 +57,4 @@ return { | ||
} else { | ||
const [ , symbol, payload ] = arr | ||
const [ tradableBalance, grossBalance, buy, sell ] = payload | ||
const [, symbol, payload] = arr | ||
const [tradableBalance, grossBalance, buy, sell] = payload | ||
@@ -61,0 +61,0 @@ return { |
@@ -92,4 +92,3 @@ 'use strict' | ||
// TODO: Convert boolFields to Object to speed lookup | ||
if (boolFields.indexOf('key') !== -1) { | ||
if (boolFields.indexOf(key) !== -1) { | ||
obj[key] = obj[key] === 1 | ||
@@ -96,0 +95,0 @@ } |
{ | ||
"name": "bfx-api-node-models", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"description": "Object models for usage with the Bitfinex node API", | ||
@@ -12,3 +12,4 @@ "engines": { | ||
"test": "npm run lint && npm run unit", | ||
"unit": "NODE_ENV=test mocha -b --recursive" | ||
"unit": "NODE_ENV=test mocha -b --recursive", | ||
"build": "babel -q ./index.js -d ./dist && babel -q ./lib -d ./dist/lib && copy package.json dist" | ||
}, | ||
@@ -24,8 +25,7 @@ "repository": { | ||
], | ||
"author": "Bitfinex", | ||
"contributors": [ | ||
"Jacob Plaster <jacob.plaster@bitfinex.com> (https://www.bitfinex.com)", | ||
"Ezequiel Wernicke <ezequiel.wernicke@bitfinex.com> (https://www.bitfinex.com)", | ||
"Josh Rossi <josh@bitfinex.com> (https://www.bitfinex.com)", | ||
"Cris Mihalache <cris.m@bitfinex.com> (https://www.bitfinex.com)", | ||
"Robert Kowalski <robert@bitfinex.com> (https://www.bitfinex.com)", | ||
"Simone Poggi <simone@bitfinex.com> (https://www.bitfinex.com)", | ||
"Paolo Ardoino <paolo@bitfinex.com> (https://www.bitfinex.com)" | ||
@@ -39,13 +39,14 @@ ], | ||
"devDependencies": { | ||
"bfx-api-node-rest": "^1.0.0", | ||
"chai": "^3.4.1", | ||
"debug": "^3.1.0", | ||
"mocha": "^3.4.2", | ||
"standard": "^10.0.2" | ||
"babel-eslint": "^10.0.3", | ||
"bfx-api-node-rest": "git+http://github.com/bitfinexcom/bfx-api-node-rest.git#semver:^1.1.3", | ||
"chai": "^4.2.0", | ||
"mocha": "^6.2.0", | ||
"standard": "^14.1.0" | ||
}, | ||
"dependencies": { | ||
"bfx-api-node-util": "bitfinexcom/bfx-api-node-util", | ||
"bluebird": "^3.5.1", | ||
"crc-32": "^1.2.0" | ||
"bfx-api-node-util": "git+http://github.com/bitfinexcom/bfx-api-node-util.git#semver:^1.0.2", | ||
"bluebird": "^3.5.5", | ||
"crc-32": "^1.2.0", | ||
"debug": "^4.1.1" | ||
} | ||
} |
@@ -13,2 +13,3 @@ # Bitfinex Node API Data Models | ||
* Candle | ||
* Currency | ||
* FundingCredit | ||
@@ -18,5 +19,7 @@ * FundingInfo | ||
* FundingOffer | ||
* FundingTickerHist | ||
* FundingTicker | ||
* FundingTrade | ||
* LedgerEntry | ||
* Liquidations | ||
* MarginInfo | ||
@@ -29,5 +32,9 @@ * Movement | ||
* PublicTrade | ||
* StatusMessagesDeriv | ||
* Trade | ||
* TradingTicker | ||
* TradingTickerHist | ||
* UserInfo | ||
* Wallet | ||
* WalletHist | ||
* Currency | ||
@@ -34,0 +41,0 @@ |
Sorry, the diff of this file is not supported yet
Git dependency
Supply chain riskContains a dependency which resolves to a remote git URL. Dependencies fetched from git URLs are not immutable and can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
106221
65
3475
108
4
1
+ Addeddebug@^4.1.1
+ Addeddebug@4.4.0(transitive)
+ Addedms@2.1.3(transitive)
Updatedbfx-api-node-util@git+http://github.com/bitfinexcom/bfx-api-node-util.git#semver:^1.0.2
Updatedbluebird@^3.5.5