askmike / gekko

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

bitstamp just stuck #794

Closed lyn168 closed 7 years ago

lyn168 commented 7 years ago

Hi all

Did anyone of you facing this problem with Bitstamp? It just stuck at No usable local data available, trying to get as much as possible from the exchange.. forever


/ \ / |/ | / |/ | / | / \ /$$$$$$ |$$$$$$$$/ $$ | /$$/ $$ | /$$/ /$$$$$$ | $$ | $$/ $$ | $$ |/$$/ $$ |/$$/ $$ | $$ | $$ |/ |$$ | $$ $$< $$ $$< $$ | $$ | $$ |$$$$ |$$$$$/ $$$$$ \ $$$$$ \ $$ | $$ | $$ \$$ |$$ |____ $$ |$$ \ $$ |$$ \ $$ __$$ | $$ $$/ $$ |$$ | $$ |$$ | $$ |$$ $$/ $$$$$$/ $$$$$$$$/ $$/ $$/ $$/ $$/ $$$$$$/

    Gekko v0.4.10
    I'm gonna make you rich, Bud Fox.

2017-06-21 09:05:25 (INFO): Setting up Gekko in realtime mode 2017-06-21 09:05:25 (INFO): 2017-06-21 09:05:25 (INFO): Setting up: 2017-06-21 09:05:25 (INFO): Candle writer 2017-06-21 09:05:25 (INFO): Store candles in a database 2017-06-21 09:05:26 (INFO):

2017-06-21 09:05:26 (INFO): Setting up: 2017-06-21 09:05:26 (INFO): Trading Advisor 2017-06-21 09:05:26 (INFO): Calculate trading advice 2017-06-21 09:05:26 (INFO): Using the strategy: talib-macd 2017-06-21 09:05:26 (INFO): The trading method requests 27 minutes of historic data. Checking availablity.. 2017-06-21 09:05:26 (INFO):

2017-06-21 09:05:26 (INFO): No usable local data available, trying to get as much as possible from the exchange..

askmike commented 7 years ago

Can you enable debug in your config and post that full output?

lyn168 commented 7 years ago

Here's the debug mode. Seems like Bitstamp is blocking data fetching?

2017-06-21 20:02:52 (INFO): Setting up Gekko in realtime mode 2017-06-21 20:02:52 (INFO): 2017-06-21 20:02:52 (INFO): Setting up: 2017-06-21 20:02:52 (INFO): Candle writer 2017-06-21 20:02:52 (INFO): Store candles in a database 2017-06-21 20:02:53 (INFO):

2017-06-21 20:02:53 (INFO): Setting up: 2017-06-21 20:02:53 (INFO): Trading Advisor 2017-06-21 20:02:53 (INFO): Calculate trading advice 2017-06-21 20:02:53 (INFO): Using the strategy: MACD 2017-06-21 20:02:53 (WARN): Warning, trading method has no name 2017-06-21 20:02:53 (INFO): The trading method requests 18 minutes of historic data. Checking availablity.. 2017-06-21 20:02:53 (INFO):

2017-06-21 20:02:53 (INFO): No usable local data available, trying to get as much as possible from the exchange.. 2017-06-21 20:02:53 (DEBUG): Fetching exchange data since 18 minutes ago 2017-06-21 20:02:59 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-21 20:03:14 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-21 20:03:29 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-21 20:03:45 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-21 20:04:00 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-21 20:04:15 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-21 20:04:31 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-21 20:04:46 (DEBUG): Bitstamp returned an error, retrying..

askmike commented 7 years ago

Strange, what market (currency + asset) do you want to run? Can you post the watch part of your config as well?

lyn168 commented 7 years ago

USD/BTC. Not sure what happened, after i restarted my Raspi3 and it won't do anything anymore. Other exchanges were ok, btce, bitfinex,poloniex

config.watch = {

// see https://github.com/askmike/gekko#supported-exchanges exchange: 'bitstamp', currency: 'USD', asset: 'BTC',

askmike commented 7 years ago

Can you download this debug version and try again: https://github.com/askmike/gekko/tree/debug/bitstamp-trades

That will log exactly why Bitstamp is not returning any data. I suspect your IP is banned.

lyn168 commented 7 years ago

This version shows the same thing. Is there any other log generated?

2017-06-22 22:26:23 (INFO): No usable local data available, trying to get as much as possible from the exchange.. 2017-06-22 22:26:23 (DEBUG): Fetching exchange data since 170 minutes ago 2017-06-22 22:26:29 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-22 22:26:44 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-22 22:27:00 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-22 22:27:15 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-22 22:27:30 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-22 22:27:45 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-22 22:28:00 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-22 22:28:16 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-22 22:28:31 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-22 22:28:47 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-22 22:29:02 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-22 22:29:17 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-22 22:29:32 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-22 22:29:47 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-22 22:30:02 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-22 22:30:17 (DEBUG): Bitstamp returned an error, retrying.. 2017-06-22 22:30:33 (DEBUG): Bitstamp returned an error, retrying..

pinovero commented 7 years ago

me too, only for bitstamp and tested on 3 different IPs, windows and linux this happen only by 3-4 days ago

lyn168 commented 7 years ago

i tried to used other internet service provider the same result as well seems like its bitstamp issue.

askmike commented 7 years ago

Very strange, can you redownload this branch and post logs once more?

lyn168 commented 7 years ago

Now its ok with this branch.

2017-06-23 09:20:18 (INFO): No usable local data available, trying to get as much as possible from the exchange.. 2017-06-23 09:20:18 (DEBUG): Fetching exchange data since 170 minutes ago 2017-06-23 09:20:20 (DEBUG): Available exchange data: 2017-06-23 09:20:20 (DEBUG): from: 59 minutes ago 2017-06-23 09:20:20 (DEBUG): to: 0 minutes ago 2017-06-23 09:20:20 (DEBUG): Unable to stitch datasets. 2017-06-23 09:20:20 (INFO): Not seeding locally available data to the trading method. 2017-06-23 09:20:23 (INFO): Starting to watch the market: Bitstamp BTC/USD 2017-06-23 09:20:23 (DEBUG): scheduling ticks 2017-06-23 09:20:23 (DEBUG): Requested BTC/USD trade data from Bitstamp ... 2017-06-23 09:20:24 (DEBUG): Processing 393 new trades. From 2017-06-23 00:20:33 UTC to 2017-06-23 01:19:34 UTC. (an hour)

bcoufal commented 7 years ago

Now it looks O.K.

askmike commented 7 years ago

@bcoufal with the normal version of Gekko or that debug branch?

bcoufal commented 7 years ago

With the normal version.

    1. 2017 v 18:07, Mike van Rossum notifications@github.com:

@bcoufal with the normal version of Gekko or that debug branch? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/askmike/gekko","title":"askmike/gekko","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/askmike/gekko"}},"updates":{"snippets":[{"icon":"PERSON","message":"@askmike in #794: @bcoufal with the normal version of Gekko or that debug branch?"}],"action":{"name":"View Issue","url":"https://github.com/askmike/gekko/issues/794#issuecomment-311406277"}}}

askmike commented 7 years ago

I am assuming this is fixed now :)