askmike / gekko

A bitcoin trading bot written in node - https://gekko.wizb.it/
MIT License
10.07k stars 3.94k forks source link

Gekko will bug when asking bitcoincharts for data older than 150000 seconds #24

Closed askmike closed 8 years ago

askmike commented 11 years ago

When asking for data from over 150,000 seconds ago Gekko will receive candles where the oldest one is a lot newer than the since date. This will cause the first couple of candles to be NaN and all EMA calculations will glitch from that point.

askmike commented 11 years ago

The API for bitcoincharts has changed* and does not support the parameter start anymore that Gekko uses to let bitcoinCharts know the dates of the trades it needs to have.

* Here are the old docs with start, here are the new docs without start.

askmike commented 11 years ago

This means that on default settings Gekko will not work on BTC-e, a current workaround can be found in the thread.

askmike commented 11 years ago

Gekko now gives proper errors about whether it is able to fetch trade data or not.

Bitcoincharts has changed it's API documentation again, it now states that the start parameter should work (the parameter Gekko is dependent on). It works for a couple of exchanges but not for BTC-e in my testing. I've reached out to them to see if they can fix it.

If anyone knows any other source for retrieving historical trade data from BTC-e please let me know!

wupeng1211 commented 9 years ago

node-bitcoincharts An unofficial node.js client for the bitcoin charts markets api.

Installation

node-bitcoincharts is available as bitcoincharts on npm.

npm install bitcoincharts Usage

var BitcoinCharts = require('bitcoincharts'), bitcoinCharts = new BitcoinCharts();

bitcoinCharts.weightedPrices(function(err, data) { if (err) { throw err; }

console.log(data); });

bitcoinCharts.markets(function(err, data) { if (err) { throw err; }

console.log(data); });

bitcoinCharts.trades({ "symbol": "mtgoxUSD", "start": 1365670800, "end": 1365670860 }, function(err, data) { if (err) { throw err; }

console.log(data); });

wupeng1211 commented 9 years ago

https://www.npmjs.com/package/bitcoincharts