Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Recover from "Failed to load orderbook" #1017

Open
glennfu opened this issue Dec 29, 2017 · 4 comments
Open

Recover from "Failed to load orderbook" #1017

glennfu opened this issue Dec 29, 2017 · 4 comments
Labels

Comments

@glennfu
Copy link
Contributor

glennfu commented Dec 29, 2017

System information

  • Zenbot: Vanilla
  • System: MacOS
  • Zenbot: latest master
  • NodeJS: v8.2.1
  • Python: v2.7.10
  • Command: ./zenbot.sh trade --paper

Describe the problem

getProductOrderBook(), both in public and authenticated forms, have no retry mechanism. Any network error results in a call to throw '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.

@DeviaVir DeviaVir added the bug label Dec 29, 2017
@assa83
Copy link

assa83 commented Dec 30, 2017

I am getting exactly the same error but absolutely no issue with network

@monshyn
Copy link

monshyn commented Jan 16, 2018

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.

@vinngn
Copy link

vinngn commented Feb 1, 2018

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
at process._tickCallback (internal/process/next_tick.js:188:7)

I dont know where to locate internal/process/next_tick.js. It could be a bug with in gdax-node.

@vinngn
Copy link

vinngn commented Feb 1, 2018

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/' }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants