Rate Limits

Rate Limits

The IPTO API implements rate limiting to ensure fair usage and system stability. This guide explains our rate limiting policies and how to handle them.

Rate Limit Headers

All API responses include rate limit information in the headers:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1616320000

Global Limits

Limit TypeLimitWindow
Requests per minute10060 seconds
Requests per hour10003600 seconds
Requests per day1000086400 seconds

Endpoint-Specific Limits

Authentication

EndpointLimitWindow
Magic link requests31 hour per email
Token verification5Per magic link
Token refresh101 hour per token

Assets

EndpointLimitWindow
Asset creation101 hour
Asset listing1001 minute
Asset updates201 hour

MicroIP

EndpointLimitWindow
License creation51 hour
Asset downloads201 hour
Search requests501 minute

Balance

EndpointLimitWindow
Deposits101 hour
Withdrawals51 hour
Balance checks1001 minute

Wallet

EndpointLimitWindow
Wallet addition51 hour
Wallet verification101 hour
Wallet listing501 minute

Handling Rate Limits

Rate Limit Exceeded

When you exceed a rate limit, you’ll receive a 429 Too Many Requests response:

{
  "detail": "Rate limit exceeded",
  "retry_after": 60
}

Best Practices

  1. Implement exponential backoff
  2. Cache responses when possible
  3. Monitor rate limit headers
  4. Handle 429 responses gracefully
  5. Use bulk endpoints when available

Example: Handling Rate Limits

import time
import requests

def make_request(url, headers):
    while True:
        response = requests.get(url, headers=headers)
        
        if response.status_code == 429:
            retry_after = int(response.headers.get('Retry-After', 60))
            time.sleep(retry_after)
            continue
            
        return response

Increasing Limits

To request higher rate limits:

  1. Contact our support team
  2. Provide your use case
  3. Share your expected volume
  4. Explain your business needs

Monitoring Usage

Monitor your API usage through:

  1. Rate limit headers
  2. Dashboard metrics
  3. Usage reports
  4. Webhook notifications

Best Practices

  1. Implement proper error handling
  2. Use appropriate timeouts
  3. Cache when possible
  4. Batch requests when available
  5. Monitor your usage