DeviaVir / zenbot

Zenbot is a command-line cryptocurrency trading bot using Node.js and MongoDB.
MIT License
8.22k stars 2.04k forks source link

Error: You are connecting too fast and are being throttled! Make sure you subscribe to multiple books on one connection. #1328

Closed JaapSch closed 6 years ago

JaapSch commented 6 years ago

System information

Describe the problem

After about an hour of execution (ingesting trades) it exits with the message to console.

I tried setting different timing in the conf.js file but to no avail c.order_adjust_time = 6000 c.order_poll_time = 6000 c.wait_for_settlement = 6000 c.poll_trades = 6000

I could not find any documentation on this error (or throttling for that matter)

Source code / logs

/home/zenbot/zenbot/node_modules/gdax/lib/clients/websocket.js:88 throw new Error( ^ Error: You are connecting too fast and are being throttled! Make sure you subscribe to multiple books on one connection. at WebsocketClient.onError (/home/zenbot/zenbot/node_modules/gdax/lib/clients/websocket.js:88:13) at emitOne (events.js:116:13) at WebSocket.emit (events.js:211:7) at ClientRequest._req.on (/home/zenbot/zenbot/node_modules/gdax/node_modules/ws/lib/WebSocket.js:649:12) at emitOne (events.js:116:13) at ClientRequest.emit (events.js:211:7) at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:551:21) at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23) at TLSSocket.socketOnData (_http_client.js:440:20) at emitOne (events.js:116:13)

fdk0 commented 6 years ago

I am also experiencing this error on Gdax with the default timing in the conf.js

araviel commented 6 years ago

Try to add the --min_periods=xxm

JaapSch commented 6 years ago

ok! I just started: zenbot.sh trade --strategy forex_analytics --min_periods=xxm --modelfile ./models/trainedModel.json

What does the "xxm" do in this parameter? ..just asking because the default = 52 which is an integer and adding a string seems strange :-)

JaapSch commented 6 years ago

Will let you know tomorrow if it worked (needs to run for a while before the error occurs)\

**Update: It just crashed within an hour ... same error I changed the paramater to the explicit default: --min_periods=52 ... let's see what happens ;-)

defkev commented 6 years ago

What does the "xxm" do in this parameter?

You are supposed to replace xx by the min. number of history periods you wan't. The default for forex is 100

joseshiru commented 6 years ago

Same problem here..

Happening in 2 different computers with different environments

McFuzz89 commented 6 years ago

I am also having the same issue. Running Ubuntu 16.04, nodeJS version 8.9.4 and zenbot 4.1.0 unstable on latest commit trading on GDAX :\

krystophv commented 6 years ago

Anyone try running with --debug flag on to capture some more diagnostic information?

krystophv commented 6 years ago

I think that #1338 will solve or at least alleviate/reduce greatly this issue.

JaapSch commented 6 years ago

I pulled the latest repo about 15 minutes ago and added --debug to see extra stuff ... let's see what pops up (if anything)

JaapSch commented 6 years ago

The latest pull seems to hold :-) ... I will check tomorrow if it still holds and if it does I will close this ticket

JaapSch commented 6 years ago

It held :-)