---
title: Errors
description: Error codes, formats, and troubleshooting for the Kiyotaka Data API.
---

# Errors

Errors return a JSON object with a code and human-readable message:

<CodeBlock lang="JSON">
<pre>{
  <span class="s-p">"error"</span>: <span class="s-s">"RATE_LIMITED"</span>,
  <span class="s-p">"message"</span>: <span class="s-s">"Rate limit exceeded"</span>,
  <span class="s-p">"retry_after"</span>: <span class="s-n">12</span>
}</pre>
</CodeBlock>

## Request errors

| Code | HTTP Status | Description |
| --- | --- | --- |
| `INVALID_API_KEY` | 401 | Missing or invalid API key. |
| `INVALID_PARAMS` | 400 | Missing or malformed query parameters. |
| `INVALID_EXCHANGE` | 400 | Unknown exchange ID. |
| `INVALID_SYMBOL` | 400 | Unknown symbol for the specified exchange. |
| `INVALID_TIMEFRAME` | 400 | Invalid interval value. |

## Tier & rate limit errors

| Condition | HTTP Status | Description |
| --- | --- | --- |
| Type not permitted | 403 | Data type not available on your tier. |
| Time range exceeded | 403 | Query exceeds your tier's history depth. |
| Multi-exchange aggregation not permitted | 403 | Aggregation requires Advanced tier. |
| Point count exceeded | 403 | Request exceeds the data type's max points per request. Reduce `period` or increase `interval`. |
| Too many requests | 429 | Rate limit exceeded. Check `Retry-After` header. |

## Server errors

| Code | HTTP Status | Description |
| --- | --- | --- |
| `TIMEOUT` | 504 | Query exceeded 30 seconds. |
| `INTERNAL_ERROR` | 500 | Server-side failure. |