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

Kraken timeouts and error handling bug #1469

Open
kareha opened this issue Mar 5, 2018 · 2 comments
Open

Kraken timeouts and error handling bug #1469

kareha opened this issue Mar 5, 2018 · 2 comments

Comments

@kareha
Copy link

kareha commented Mar 5, 2018

System information

  • Have I written custom code (as opposed to using zenbot vanilla): no
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): linux
  • Zenbot version (commit ref, or version): 4.10 latest
  • Zenbot branch: master
  • NodeJS version: latest
  • Python version (when using a python script): latest
  • Exact command to reproduce (include everything): zenbot trade kraken.XXBT-ZEUR
  • Did I make any changes to conf-sample.js?: no

Describe the problem

Kraken api often times out.
Kraken getTrades errors are not passed to callback, leads to "Download Complete" if its not. (see code below)
Kraken trade error handling, leads to trades, without getting order id? Needs to be checked further.

Source code / Error logs

Add Kraken timeout:
Change Line 21 to:
public_client = new KrakenClient('', '', { timeout: 30000 })

Change Line 31 to:
authed_client = new KrakenClient(conf.kraken.key, conf.kraken.secret, { timeout: 30000 })

Kraken Error handling:
Change Line 119 to:
return cb(error)

Unsure, but Add to Line 294:
return cb(null, order)
Also within the block from Line 278 to 295: Missing error handling if error but none of the error condition matches?

@Scre13
Copy link

Scre13 commented Mar 7, 2018

@kareha solution solves the Kraken timeout issue, but from 15-30 minutes a new warnung is shown:
"Kraken API warning - unable to call getBalance (Error: API:Invalid nonce), retrying in 0.5s"

grafik

@diegstroyer
Copy link
Contributor

Looks that your code solves the issue, thanks @kareha

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

No branches or pull requests

4 participants