Skip to content

Conversation

@zegarekk
Copy link

@zegarekk zegarekk commented Nov 3, 2025

Summary

This PR adds a new helper class RateLimitLogger to xchange-core to standardize how API rate-limit warnings are logged.

Motivation

Different exchange modules currently log rate-limit issues inconsistently.
The new class ensures that all such warnings:

  • follow the same format
  • are throttled to avoid log flooding
  • improve observability for developers and CI systems

Changes

  • Added new file: xchange-core/src/main/java/org/knowm/xchange/utils/RateLimitLogger.java
  • Updated xchange-binance and xchange-kraken modules to use it (example in next commit)

Benefits

✅ Unified rate-limit log format
✅ Reduced log spam
✅ Easier future maintenance

Checklist

  • Code compiles successfully
  • Unit-tested locally
  • No external dependency added
  • Backward compatible
  • Additional integrations planned (stream modules)

Example output

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant