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

Commit

Permalink
fix #379
Browse files Browse the repository at this point in the history
  • Loading branch information
askmike committed Jul 10, 2016
1 parent 532e724 commit 1ac2013
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion importers/exchanges/poloniex.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,15 @@ var fetch = () => {
}

var handleFetch = trades => {
var last = moment.unix(_.last(trades).date);

iterator.from.add(batchSize, 'minutes').subtract(overlapSize, 'minutes');
iterator.to.add(batchSize, 'minutes').subtract(overlapSize, 'minutes');

if(!_.size(trades))
return fetcher.emit('trades', []);

var last = moment.unix(_.last(trades).date);

if(last > end) {
fetcher.emit('done');

Expand Down
1 change: 1 addition & 0 deletions sample-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ config.debug = true; // for additional logging / debugging

// Monitor the live market
config.watch = {

// see https://github.com/askmike/gekko#supported-exchanges
exchange: 'Bitstamp',
currency: 'USD',
Expand Down

0 comments on commit 1ac2013

Please sign in to comment.