Well,
I think I got it.
First of all you have to change the source where email.js is retrieved:
/gekko-master/package.json
After this it will successfully install via npm.
Step 1 Change Bitcoincharts Api Link:
/gekko-master/node-modules/bitcoincharts/bitcoincharts.js
/**
* The client for bitcoincharts.com API.
*
* @constructor
*/
var BitcoinCharts = function() {
this.url = "http://api.bitcoincharts.com/v1/";
};
Step 2 Change reversal of trades.csv:
/gekko-master/exchanges/bitcoincharts.js
Watcher.prototype.getTrades = function(since, callback, descending) {
var params = { symbol: this.symbol };
if(since)
// we don't want to hammer bitcoincharts,
// this will fetch trades between start and now
params.start = since.format('X');
var args = _.toArray(arguments);
this.bitcoinCharts.trades(params, _.bind(function(err, data) {
if(err)
return this.retry(this.getTrades, args);
if(!data || !data.length)
return this.retry(this.getTrades, args);
// normalize the data
var trades = [];
_.each(data, function(array) {
trades.push({
date: array[0],
price: array[1],
amount: array[2]
});
});
if(descending)
callback(trades.reverse());
else
callback(trades);
}, this));
}
Step 3 Change how the latest trades are fetched:
/gekko-master/methods/realtime-candle-fetcher.js
// this method fetches most recent trades and calculates a new candle based on the trades
CandleCalculator.prototype.getNewCandle = function() {
if(this.fetchingHistorical)
// we just fetched all historical buckets
this.fetchingHistorical = false;
else
this.removeOldestBucket();
this.removeOldestCandle();
log.debug('fetching new trades for new bucket at', this.watcher.name);
this.watcher.getTrades(util.intervalsAgo(1), this.fillNewBucket, true);
}
Its a quite simple workaround and of course not that beautiful but fetching trades from Bitcoincharts should be fixed then.
But it would be nice if the author or any other trusted programmer could test and validate those changes.
Have a nice weekend gekkos.