Skip to content

Commit

Permalink
Implemented fixes for issues raised on Pull Request ccxt#373, proper …
Browse files Browse the repository at this point in the history
…exponential backoff random selection times (in seconds) and lowering Krakens starting tokens, to avoid being rate limited on Kraken
  • Loading branch information
samholt committed Oct 23, 2017
1 parent 5ffe3da commit db39b6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ccxt/async/exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async def wait_for_token(self):
# if self.verbose:
# print('Waiting for tokens: Exchange: {0}'.format(self.id))
self.add_new_tokens()
seconds_delays = [0.01, 0.1, 0.7, 1, 1.5, 2]
seconds_delays = [0.001, 0.005, 0.022, 0.106, 0.5]
delay = random.choice(seconds_delays)
await asyncio.sleep(delay)
self.rateLimitTokens -= 1
Expand Down
2 changes: 2 additions & 0 deletions ccxt/async/exchanges.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit db39b6c

Please sign in to comment.