zenbot icon indicating copy to clipboard operation
zenbot copied to clipboard

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

Open JaapSch opened this issue 8 years ago • 12 comments

System information

  • **Have I written custom code **: No

  • **OS Platform and Distribution **: Linux Debian stable - Stretch (9.3)

  • Zenbot version: 4.1.0

  • NodeJS version: v8.9.4

  • Python version: 2.7.13

  • Exact command to reproduce: zenbot.sh trade --strategy forex_analytics --modelfile ./models/trainedModel.json

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)

JaapSch avatar Feb 12 '18 13:02 JaapSch

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

fdk0 avatar Feb 12 '18 22:02 fdk0

Try to add the --min_periods=xxm

araviel avatar Feb 13 '18 03:02 araviel

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 avatar Feb 13 '18 08:02 JaapSch

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 ;-)

JaapSch avatar Feb 13 '18 08:02 JaapSch

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

defkev avatar Feb 13 '18 20:02 defkev

Same problem here..

Happening in 2 different computers with different environments

joseshiru avatar Feb 13 '18 20:02 joseshiru

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 :\

McFuzz89 avatar Feb 14 '18 02:02 McFuzz89

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

krystophv avatar Feb 14 '18 03:02 krystophv

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

krystophv avatar Feb 14 '18 05:02 krystophv

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 avatar Feb 14 '18 20:02 JaapSch

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

JaapSch avatar Feb 15 '18 13:02 JaapSch

It held :-)

JaapSch avatar Feb 28 '18 11:02 JaapSch