kraken-exchange
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -72,2 +72,14 @@ // Generated by CoffeeScript 2.0.0-beta2 | ||
bidAsk(...pairs) { | ||
return this.ticker(pairs).then(function(result) { | ||
var data, obj, pair; | ||
obj = {}; | ||
for (pair in result) { | ||
data = result[pair]; | ||
obj[pair] = (parseFloat(data.a[0]) + parseFloat(data.b[0])) / 2; | ||
} | ||
return obj; | ||
}); | ||
} | ||
ohlc(pair, interval, last) { | ||
@@ -289,3 +301,3 @@ var krak, options; | ||
item = result[key]; | ||
currency = item.pair.substr(-4).replace(/^[XZ]/, ''); | ||
currency = item.pair.substr(-3); | ||
if (profits[currency] == null) { | ||
@@ -292,0 +304,0 @@ profits[currency] = 0; |
@@ -27,6 +27,6 @@ // Generated by CoffeeScript 2.0.0-beta2 | ||
var key, ref, val; | ||
ref = this.result; | ||
ref = this._result; | ||
for (key in ref) { | ||
val = ref[key]; | ||
this.result[key] = parseFloat(val); | ||
this._result[key] = parseFloat(val); | ||
} | ||
@@ -41,2 +41,5 @@ return this; | ||
} | ||
if (Array.isArray(item)) { | ||
return item; | ||
} | ||
obj = {}; | ||
@@ -43,0 +46,0 @@ for (key in item) { |
{ | ||
"name": "kraken-exchange", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Simple library to access the Kraken Exchange API", | ||
"homepage": "https://github.com/CliffS/kraken-exchange#readme", | ||
"main": "bin/kraken.js", | ||
"main": "lib/kraken.js", | ||
"scripts": { | ||
@@ -8,0 +8,0 @@ "test": "echo \"Error: no test specified\" && exit 1", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52330
593