Open glennfu opened 6 years ago
I am getting exactly the same error but absolutely no issue with network
I'm also having the same error and its stops zenbot. I'm also seeing more GDAX API is down! unable to call getQuote, retrying in 10s errors, as well. This second error doesn't stop zenbot, it keeps trading after the error. I'm not sure if it's related.
Running zenbot backfill gdax.BTC-USD --days=1
, get same error.
Error: Failed to load orderbook: Cannot read property 'map' of undefined
at OrderbookSync.onError (/Users/vn/coin/zenbot/node_modules/gdax/lib/orderbook_sync.js:95:26)
at
I dont know where to locate internal/process/next_tick.js
. It could be a bug with in gdax-node.
Further debugging, GDAX is under maintenance when I ran that. Response from gdax when loading orderbook { message: 'GDAX is currently under maintenance. For updates please see https://status.gdax.com/' }
System information
Describe the problem
getProductOrderBook()
, both in public and authenticated forms, have no retry mechanism. Any network error results in a call tothrow 'Failed to load orderbook: ' + response.statusCode;
immediately closing Zenbot.I'm currently in an area where the network can hang for up to a minute, and it can't be helped. I'm assuming that's what happened while Zenbot was trying to refresh the order book, and so the whole thing just crashed. Ideally, it would wait for a couple of seconds, and then try again, with no crash, in the same way that backfill.js's and trade.js's
exchange.getTrades
know how to retry without crashing.