zenbot icon indicating copy to clipboard operation
zenbot copied to clipboard

Crash during live trading.

Open station384 opened this issue 8 years ago • 4 comments

Branch: Unstable

Getting this error. Looks like it could be that the api returned an error that was unknown. I've received this error 3x in the last 5 hours.

Command: ./zenbot.sh trade bittrex.XRP-USDT --avg_slippage_pct=0.045 --bollinger_lower_bound_pct=16.573725742046623 --bollinger_size=5 --bollinger_time=5.718442655882575 --bollinger_upper_bound_pct=6.55491217292086 --buy_stop_pct=12 --markdown_buy_pct=0.6928484993307022 --markup_sell_pct=-0.0014423681389312826 --max_sell_loss_pct=25 --max_slippage_pct=5 --min_periods=20 --order_type=maker --period=16m --period_length=16m --profit_stop_enable_pct=0 --profit_stop_pct=9 --rsi_periods=14 --sell_stop_pct=36 --strategy=bollinger

/extensions/exchanges/bittrex/exchange.js:162 if(!data.success) { ^

TypeError: Cannot read property 'success' of null at /media/zenbot/zenbot/extensions/exchanges/bittrex/exchange.js:162:18 at Request._callback (/media/zenbot/zenbot/node_modules/node.bittrex.api/node.bittrex.api.js:127:11) at self.callback (/media/zenbot/zenbot/node_modules/request/request.js:186:22) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at ClientRequest. (/media/zenbot/zenbot/node_modules/request/request.js:785:18) at Object.onceWrapper (events.js:313:30) at emitNone (events.js:106:13) at ClientRequest.emit (events.js:208:7) at TLSSocket.emitTimeout (_http_client.js:708:34) at Object.onceWrapper (events.js:313:30) at emitNone (events.js:106:13) at TLSSocket.emit (events.js:208:7) at TLSSocket.Socket._onTimeout (net.js:407:8) at ontimeout (timers.js:475:11) at tryOnTimeout (timers.js:310:5) at Timer.listOnTimeout (timers.js:270:5)

station384 avatar Jan 23 '18 19:01 station384

node.bittrex.api is EOL and has be superseded by node-bittrex-api

See https://github.com/n0mad01/node.bittrex.api and https://github.com/dparlevliet/node.bittrex.api

Updating package.json should suffice as it's just a fork.

defkev avatar Jan 23 '18 21:01 defkev

Changed to the node-bittrex-api you mentioned. still getting the error, so no simple fix there :/ Was trying to avoid putting this in the debugger.

station384 avatar Jan 23 '18 22:01 station384

It looks like when using a lower buy percent i.e. 5% less than asking price and the buy order hangs out for awhile, it causes the exchange to be polled once every 5 seconds. this is file until you have more than one session trading. It looks like the exchange is blocking, but not returning an error. I've increased the poll time from 5 seconds to 8 seconds on the order monitoring, see if that helps. It doesn't correct the error handling but my avoid the error.

Still investigating the problem. Its hard as it only happens during live trading, and not fully repeatable. (without risking being banned)

station384 avatar Jan 24 '18 02:01 station384

Dead end on the polling time. still occurs event with lower polling.

station384 avatar Jan 24 '18 04:01 station384