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.1 to 6.0.2

130

build/d3fc-financial-feed.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-fetch')) :
typeof define === 'function' && define.amd ? define(['exports', 'd3-fetch'], factory) :
(factory((global.fc = global.fc || {}),global.d3));
}(this, (function (exports,d3Fetch) { 'use strict';
(global = global || self, factory(global.fc = global.fc || {}, global.d3));
}(this, function (exports, d3Fetch) { 'use strict';
// https://docs.gdax.com/#market-data
var gdax = function () {
// 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 = [];
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]
};
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]
};
});
});
});
};
};
gdax.product = function (x) {
if (!arguments.length) {
return product;
}
product = x;
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;
};
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;
};
exports.feedGdax = gdax;
exports.feedGdax = gdax;
Object.defineProperty(exports, '__esModule', { value: true });
Object.defineProperty(exports, '__esModule', { value: true });
})));
}));

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

<a name="6.0.2"></a>
## [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)
**Note:** Version bump only for package @d3fc/d3fc-financial-feed
<a name="6.0.1"></a>

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

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

@@ -23,8 +23,6 @@ "license": "MIT",

"scripts": {
"bundle": "d3fc-scripts bundle",
"test": "d3fc-scripts test"
"bundle": "npx rollup -c ../../scripts/rollup.config.js",
"test": "npx jasmine --config=../../scripts/jasmine.json",
"lint": "npx eslint src/**/*.js"
},
"devDependencies": {
"@d3fc/d3fc-scripts": "^2.0.5"
},
"dependencies": {

@@ -31,0 +29,0 @@ "d3-fetch": "^1.1.0"

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