Galts-Gulch / avarice

Multi-Indicator Python3 OKCoin CN & Intl Trading Bot/Infrastructure
Other
91 stars 29 forks source link

Multiple connections to Private Websocket #16

Closed ghost closed 9 years ago

ghost commented 9 years ago

Each candle tick seems to display "connecting to Private OKCoin WebSocket". Not sure if this is intended or not but thought I would present it and see if this expected behavior or not.

Connecting to Private OKCoin WebSocket... Database is recent enough; resuming Connecting to Public OKCoin WebSocket... Waiting 6.79 minutes to resume on schedule Candle: 611 | Price: 1718.66 cny | Time: 20:52:03 | Date: 2015/03/07 FullStochRSID: 0.0 Connecting to Private OKCoin WebSocket... Connecting to Private OKCoin WebSocket... Connecting to Private OKCoin WebSocket... Connecting to Private OKCoin WebSocket... MACD : We are in a Downtrend | Diff: 1.3948082528163468 MACD Hist: -1.0601867046081859 Candle: 612 | Price: 1719.11 cny | Time: 21:07:03 | Date: 2015/03/07 FullStochRSID: 0.7040360270089825 Connecting to Private OKCoin WebSocket... Connecting to Private OKCoin WebSocket... Connecting to Private OKCoin WebSocket... Connecting to Private OKCoin WebSocket... MACD : We are in a Downtrend | Diff: 0.9308467902690154 MACD Hist: -1.219318533724414

RealJohnGalt commented 9 years ago

This actually isn't a bug, though it probably shouldn't be so verbose by default. There aren't multiple connections being made. That prints if the private websocket connection is being connected (due to no existing connection after the first attempt). The same can happen with the public connection if the it's not a stable connection.

I'll be sure to make this level of verbosity opt in shortly.

ghost commented 9 years ago

Thanks, that makes sense. Was just seeing if that was expected or not. :)