Skip to content

Commit

Permalink
Unbreaking backfill on kraken (DeviaVir#468)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
cmroche authored and DeviaVir committed Aug 14, 2017
1 parent 0a5c70d commit 30d53e4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions extensions/exchanges/kraken/exchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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) {
Expand Down

0 comments on commit 30d53e4

Please sign in to comment.