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

kraken-exchange

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kraken-exchange - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

14

lib/kraken.js

@@ -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;

7

lib/local/KrakenResponse.js

@@ -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",

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