From 30d53e454485953e95e507900af161a7c36a5941 Mon Sep 17 00:00:00 2001 From: Clifford Roche Date: Mon, 14 Aug 2017 03:31:52 -0400 Subject: [PATCH] Unbreaking backfill on kraken (#468) * Unbreaking backfill on kraken Yeah... not sure how I managed to move that block of code. * Since timestamps are now fixed (ms) we need to remove 3 0's from the since arg --- extensions/exchanges/kraken/exchange.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/exchanges/kraken/exchange.js b/extensions/exchanges/kraken/exchange.js index f79b1aff22..4b4bbf48ee 100644 --- a/extensions/exchanges/kraken/exchange.js +++ b/extensions/exchanges/kraken/exchange.js @@ -79,6 +79,9 @@ module.exports = function container(get, set, clear) { var args = { pair: joinProduct(opts.product_id) } + if (opts.from) { + args.since = Number(opts.from) * 1000000 + } client.api('Trades', args, function(error, data) { if (error && error.message.match(recoverableErrors)) { @@ -92,9 +95,6 @@ module.exports = function container(get, set, clear) { if (data.error.length) { return cb(data.error.join(',')) } - if (opts.from) { - args.since = Number(opts.from) * 1000000000 - } var trades = [] Object.keys(data.result[args.pair]).forEach(function(i) {