
#### Getting Started

# Rate Limits

Best practices for using the HypeProxy.io API responsibly.

## General Guidelines

To ensure the stability and availability of the API for all users, please follow these guidelines when making requests:

- **Avoid rapid successive calls** to the same endpoint. Space your requests with reasonable intervals.
- **Cache responses** when possible. For example, account information doesn't change frequently and doesn't need to be fetched on every request.
- **IP rotation requests** should be spaced according to your proxy plan's rotation interval. Sending rotation requests faster than your plan allows won't provide any benefit.

## Recommended Intervals

| Endpoint | Recommended Interval |
| -------- | -------------------- |
| `DirectRenewIp` | Depends on your plan (e.g., every 5-10 minutes) |
| `GetResponseTime` | Every 30-60 seconds if monitoring |
| `GetExternalIp` | After each IP rotation to confirm the change |
| `GetInformations` | Once per session or on-demand |

## Error Handling

If you receive a `429 Too Many Requests` response, back off and retry after a short delay. Implement exponential backoff in your automation scripts to handle rate limiting gracefully:

```javascript
async function fetchWithRetry(url, headers, maxRetries = 3) {
  for (let i = 0; i < maxRetries; i++) {
    const response = await fetch(url, { headers });
    if (response.status !== 429) return response;
    await new Promise(resolve => setTimeout(resolve, Math.pow(2, i) * 1000));
  }
  throw new Error('Max retries exceeded');
}
```
