> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cryptechtoday.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors & Rate Limits

> Standard HTTP error formats, rate limits, and recovery strategies

# Errors & Rate Limits

CrypTech uses conventional HTTP status codes to indicate the success or failure of an API request. In general:

* **2xx**: Codes in the `200` range indicate success.
* **4xx**: Codes in the `400` range indicate an error that resulted from the provided information (e.g., missing parameter, invalid address format, unauthorized key).
* **5xx**: Codes in the `500` range indicate an error with CrypTech's data processing pipeline.

***

## Status Codes

| Code | Status | Meaning |
| :- | :- | :- |
| `200` | **OK** | The request succeeded and returned the analyzed payload. |
| `400` | **Bad Request** | Missing required parameters or malformed contract address. Addresses must be 42-character hexadecimal strings starting with `0x`. |
| `401` | **Unauthorized** | Missing, invalid, or expired `X-API-Key` header. |
| `403` | **Forbidden** | Your key lacks permission for the requested resource or tier. |
| `429` | **Too Many Requests** | Rate limit or daily quota allocation exceeded. Back off and retry. |
| `500` | **Internal Error** | An unexpected error occurred while querying underlying blockchain nodes. |
| `503` | **Service Unavailable** | Temporary upstream RPC degradation. The service is recovering. |

***

## Error Response Format

When an error occurs, the API returns a structured JSON payload detailing the failure reason:

```json theme={null}
{
  "error": "API_KEY_REQUIRED",
  "detail": "Direct programmatic API access requires a valid X-API-Key header. Request developer access at contactus@cryptechtoday.com."
}
```

Or for address validation errors:

```json theme={null}
{
  "error": "INVALID_ADDRESS",
  "detail": "Invalid contract address format. Must be a 42-character hex string starting with 0x."
}
```

***

## Rate Limits & Quotas

API keys are provisioned with rate limits tailored to the tier of service:

| Tier | Request Rate | Daily Quota | Primary Use Case |
| :- | :- | :- | :- |
| **Developer Preview** | 5 requests / sec | 500 scans / day | Prototyping, personal scripts, hobby bots |
| **Professional** | 30 requests / sec | 25,000 scans / day | Production Telegram bots, DEX aggregator routing |
| **Institutional / Enterprise** | 100+ requests / sec | Custom / Unlimited | High-frequency trading desks, custody & compliance |

***

## Exponential Backoff & Retry Logic

When handling `429 Too Many Requests` or temporary `503 Service Unavailable` errors, your application should implement exponential backoff with full jitter:

```python Python theme={null}
import time
import random
import requests

def call_with_retry(url, headers, payload, max_retries=4):
    delay = 1.0  # Base delay in seconds
    for attempt in range(max_retries):
        response = requests.post(url, headers=headers, json=payload)
        
        if response.status_code == 200:
            return response.json()
        
        if response.status_code in [429, 503]:
            # Jittered exponential backoff: delay * (2^attempt) + random jitter
            sleep_time = delay * (2 ** attempt) + random.uniform(0.1, 0.5)
            print(f"Rate limited or busy. Retrying in {sleep_time:.2f}s...")
            time.sleep(sleep_time)
            continue
            
        # Do not retry on client-side errors like 400 or 401
        response.raise_for_status()

    raise Exception("Max retry attempts reached")
```

```typescript TypeScript theme={null}
async function fetchWithRetry<T>(
  url: string,
  options: RequestInit,
  maxRetries = 4
): Promise<T> {
  let delay = 1000;

  for (let attempt = 0; attempt < maxRetries; attempt++) {
    const res = await fetch(url, options);

    if (res.ok) {
      return (await res.json()) as T;
    }

    if (res.status === 429 || res.status === 503) {
      const jitter = Math.random() * 500;
      const sleepTime = delay * Math.pow(2, attempt) + jitter;
      console.warn(`Encountered ${res.status}. Retrying in ${Math.round(sleepTime)}ms...`);
      await new Promise((resolve) => setTimeout(resolve, sleepTime));
      continue;
    }

    throw new Error(`API Request failed with status ${res.status}`);
  }

  throw new Error('Max retries exceeded');
}
```


## Related topics

- [Market Regime](https://docs.cryptechtoday.com/api-reference/market-regime.md)
- [Introduction](https://docs.cryptechtoday.com/index.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.