Skip to content

Interface: RateLimiterOptions ​

proactive token-bucket rate limiter for APIs that provide no RateLimit-* headers

features strict FIFO queuing to prevent starvation and automatic rate recovery to restore bandwidth after 429 throttling events.

Properties ​

PropertyTypeDescription
burst?numbermaximum burst capacity
ratePerSecond?numbersustained request rate, in reqs/sec default: 60 (or per-network default such as 350 for PikaNetwork)
recoveryCooldownMs?numberms of elapsed time after a 429 without further throttles before gradually ramping rate back to original capacity. default: 5000ms

Distributed under the MIT License.