New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@d3fc/d3fc-financial-feed

Package Overview
Dependencies
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@d3fc/d3fc-financial-feed - npm Package Compare versions

Comparing version 6.0.2 to 6.0.3

build/d3fc-financial-feed.min.js

125

build/d3fc-financial-feed.js

@@ -7,66 +7,75 @@ (function (global, factory) {

// https://docs.gdax.com/#market-data
function gdax () {
var product = 'BTC-USD';
var start = null;
var end = null;
var granularity = null;
var product = 'BTC-USD';
var start = null;
var end = null;
var granularity = null;
var gdax = function gdax() {
var params = [];
var gdax = function gdax() {
var params = [];
if (start != null) {
params.push('start=' + start.toISOString());
}
if (end != null) {
params.push('end=' + end.toISOString());
}
if (granularity != null) {
params.push('granularity=' + granularity);
}
var url = 'https://api.gdax.com/products/' + product + '/candles?' + params.join('&');
return d3Fetch.json(url).then(function (data) {
return data.map(function (d) {
return {
date: new Date(d[0] * 1000),
open: d[3],
high: d[2],
low: d[1],
close: d[4],
volume: d[5]
};
});
});
};
if (start != null) {
params.push('start=' + start.toISOString());
}
gdax.product = function (x) {
if (!arguments.length) {
return product;
}
product = x;
return gdax;
};
gdax.start = function (x) {
if (!arguments.length) {
return start;
}
start = x;
return gdax;
};
gdax.end = function (x) {
if (!arguments.length) {
return end;
}
end = x;
return gdax;
};
gdax.granularity = function (x) {
if (!arguments.length) {
return granularity;
}
granularity = x;
return gdax;
};
if (end != null) {
params.push('end=' + end.toISOString());
}
if (granularity != null) {
params.push('granularity=' + granularity);
}
var url = 'https://api.gdax.com/products/' + product + '/candles?' + params.join('&');
return d3Fetch.json(url).then(function (data) {
return data.map(function (d) {
return {
date: new Date(d[0] * 1000),
open: d[3],
high: d[2],
low: d[1],
close: d[4],
volume: d[5]
};
});
});
};
gdax.product = function (x) {
if (!arguments.length) {
return product;
}
product = x;
return gdax;
};
gdax.start = function (x) {
if (!arguments.length) {
return start;
}
start = x;
return gdax;
};
gdax.end = function (x) {
if (!arguments.length) {
return end;
}
end = x;
return gdax;
};
gdax.granularity = function (x) {
if (!arguments.length) {
return granularity;
}
granularity = x;
return gdax;
};
return gdax;
}

@@ -73,0 +82,0 @@

@@ -6,2 +6,10 @@ # Change Log

## [6.0.3](https://github.com/d3fc/d3fc/compare/@d3fc/d3fc-financial-feed@6.0.2...@d3fc/d3fc-financial-feed@6.0.3) (2019-09-04)
**Note:** Version bump only for package @d3fc/d3fc-financial-feed
<a name="6.0.2"></a>

@@ -8,0 +16,0 @@ ## [6.0.2](https://github.com/d3fc/d3fc/compare/@d3fc/d3fc-financial-feed@6.0.1...@d3fc/d3fc-financial-feed@6.0.2) (2019-08-12)

{
"name": "@d3fc/d3fc-financial-feed",
"version": "6.0.2",
"version": "6.0.3",
"description": "An API for fetching financial time-series data from different sources including GDAX",

@@ -32,3 +32,4 @@ "license": "MIT",

"access": "public"
}
},
"gitHead": "d216bebca76b9bde7456f1c06e768bc67814dd2e"
}

Sorry, the diff of this file is not supported yet

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