Rate Limiting
How to work with rate limiting constraints on some API endpoints
How to work with rate limiting constraints on some API endpoints
Rate limiting controls how many requests a consumer can make to specific API endpoints within a defined time period. This helps prevent traffic spikes, protects the platform from abuse, and ensures consistent performance for all users.
Wayflyer Hosted Capital applies rate limits using a sliding window strategy. Instead of resetting counts at fixed intervals (e.g., every hour on the hour), the sliding window continuously measures request volume over a moving time period.
For example, if an endpoint allows 100 requests per hour, the system evaluates how many requests were made in the 60 minutes immediately preceding each new request. If fewer than 100 requests were made within that rolling window, the new request is allowed. If the total exceeds the limit, the request is rejected.
To help consumers monitor usage and avoid hitting these limits, every response from a rate-limited endpoint also includes the following headers:
RateLimit-Limit: the maximum number of requests allowed within the sliding window.RateLimit-Remaining: how many requests remain available before the limit is reached.In addition, when a consumer exceeds the limit for a given endpoint, the API responds with HTTP 429 Too Many Requests and the following header:
Retry-After: the number of seconds the client must wait before attempting another request.