Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Unbreaking backfill on kraken #468

Merged
merged 2 commits into from
Aug 14, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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