Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kraken - Telegram chat flooded with rate limit messages #7000

Open
ghost opened this issue Apr 29, 2024 · 5 comments
Open

kraken - Telegram chat flooded with rate limit messages #7000

ghost opened this issue Apr 29, 2024 · 5 comments

Comments

@ghost
Copy link

ghost commented Apr 29, 2024

Describe the bug

When running a strategy that uses the kraken connector, and telegram_enabled, the telegram chat is flooded with messages relating to API rate limit.

For instance, the messages read:

(2024-04-29 15:19:55) API rate limit on /0/public/Ticker (1 calls per 1s) has almost reached. Limits used is 1 in the last 1 seconds

The current rate at which I am seeing these messages is somewhere along the lines of 2/minute.

Steps to reproduce

  1. modify scripts/fixed_grid.py to use kraken connector
  2. setup telegram integration
  3. start bot using the modified fixed_grid.py script

Release version

1.27.0

Type of installation

Docker

Attach required files

No response

@ghost ghost added the bug label Apr 29, 2024
@ghost ghost changed the title Bug Report Telegram chat flooded with rate limit messages when using kraken connector Apr 29, 2024
@ghost ghost changed the title Telegram chat flooded with rate limit messages when using kraken connector kraken - Telegram chat flooded with rate limit messages Apr 29, 2024
@Sengoku11
Copy link

Sengoku11 commented Apr 30, 2024

Recently have the same API rate limit on REQUEST_WEIGHT has almost reached error. Didn't use kraken connector in strategies.

@rapcmia rapcmia added the kraken label Apr 30, 2024
@Sengoku11
Copy link

Screenshot 2024-05-01 at 11 55 57 Pure Market Making strategy with hitbtc connector.

@ghost
Copy link
Author

ghost commented May 2, 2024

hmmm, I think this might be a shared issue? the below snippet may be the culprit? what's the solution here? lower the level of these messages so they only go to logs instead of telegram ?

if capacity_used + weight > rate_limit.limit:
if self._last_max_cap_warning_ts < now - MAX_CAPACITY_REACHED_WARNING_INTERVAL:
msg = f"API rate limit on {rate_limit.limit_id} ({rate_limit.limit} calls per " \
f"{rate_limit.time_interval}s) has almost reached. Limits used " \
f"is {capacity_used} in the last " \
f"{rate_limit.time_interval} seconds"
self.logger().notify(msg)
AsyncRequestContextBase._last_max_cap_warning_ts = now
return False

@Sengoku11
Copy link

Sengoku11 commented May 2, 2024

@rapcmia I guess the issue is with binance oracle

@xiawu
Copy link

xiawu commented May 2, 2024

For a workaround, you can use the coin_cap as the oracle source.

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

No branches or pull requests

3 participants