This repository has been archived by the owner on Feb 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add exchange-specific tips to help others avoid similar headaches. (#908
) * Add exchange-specific tips to help others avoid similar headaches. * Add comment on handling Kraken Nonce errors.
- Loading branch information
1 parent
450ab56
commit 0194b41
Showing
3 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Zenbot Tips for Bitstamp | ||
|
||
The following tips can increase reliability in using Zenbot with Bitstamp. | ||
|
||
## 0 Balance | ||
|
||
This is often an indication of a mistake in your conf `c.bitstamp.client_id` value. | ||
|
||
This value should be set to the value of your Customer ID. You can find this ID by going to My Account in Bitstamp: https://www.bitstamp.net/account/balance/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Zenbot Tips for Kraken | ||
|
||
The following tips can increase reliability in using Zenbot with Kraken. | ||
|
||
## API Rate Limit | ||
|
||
These errors mean that Zenbot is sending too many requests to Kraken in a given amount of time: | ||
> Kraken API error - unable to call getTrades (Error: Kraken API returned error: API:Rate limit exceeded), retrying in | ||
There are two ways past this: | ||
* Increase your [Kraken Account Tier](https://support.kraken.com/hc/en-us/articles/206548367-What-is-the-API-call-rate-limit-). Higher tier accounts have a more relaxed rate limit. | ||
* Increase poll timers in the zenbot `conf.js`. This reduces how many requests Zenbot is sending in a given amount of time. | ||
|
||
### Poll Timers | ||
The following `conf.js` settings have helped prevent this from happening: | ||
```javascript | ||
// Poll order status every 3 seconds | ||
c.order_poll_time = 3000 | ||
|
||
// Poll new trades every 6 seconds | ||
c.poll_trades = 6000 | ||
``` | ||
|
||
## Kraken API returned error: API:Invalid nonce | ||
|
||
This is a common error when calling exchange APIs on a regular basis: | ||
>Kraken API warning - unable to call getBalance (Error: Kraken API returned error: API:Invalid nonce), retrying in 0.15s | ||
Nonce errors aren't usually an issue but can introduce a slight delay in your trading. In Kraken, you can increase your API Nonce window, reducing the chances of this happening. | ||
|
||
Log into your Kraken account, navigate through *Settings* then *API*, select your API Key and increase your *Nonce Window* for the API Key used by Zenbot. | ||
|
||
|
||
## Orders Placed & Forgotten | ||
|
||
I've seen Zenbot getting stuck with `Selling` or `Buying`. Checking for open orders in Kraken, I see the open order there, but Zenbot doesn't seem to have realised the order was placed. This usually happens while the Kraken API is under high load. | ||
|
||
The solution to this is a simple change in this javascript file: | ||
``` | ||
node_modules/kraken-api/kraken.js | ||
``` | ||
|
||
Look for this line: | ||
``` | ||
var config = { | ||
url: 'https://api.kraken.com', | ||
version: '0', | ||
key: key, | ||
secret: secret, | ||
otp: otp, | ||
timeoutMS: 5000 | ||
}; | ||
``` | ||
|
||
Increase the timeoutMS value, for example: | ||
``` | ||
var config = { | ||
url: 'https://api.kraken.com', | ||
version: '0', | ||
key: key, | ||
secret: secret, | ||
otp: otp, | ||
timeoutMS: 30000 | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Zenbot Exchange API Tips | ||
Since Zenbot supports a number of exchanges, it's becoming harder to provide "default" polling settings that work well with all exchange APIs. The goal of this document is to share any settings or tweaks that we find to increase reliability. Anything from proventing API rate limit lockouts (GDAX) to ensuring orders are tracked properly (Kraken). | ||
|
||
Any contribution that makes this better for everyone is certainly welcome. | ||
|
||
## Exchanges | ||
|
||
* [Bitstamp](bitstamp.md) | ||
* [Kraken](kraken.md) | ||
|
||
|