Errors
Errors come back as JSON. Most use the shape { "error": "<code>", "message": "<description>" } (for example not_found or rate_limit_exceeded). Parameter validation errors (400, such as an out-of-range limit or a missing required parameter) currently use { "success": false, "error": { "name": "ZodError", "message": "<details>" } }. Branching on the HTTP status is the most reliable approach.
| Code | Meaning |
|---|---|
| 400 | Invalid request parameters (format or range error) |
| 401 | API key missing or invalid |
| 403 | API key has been revoked |
| 404 | Symbol or data not found |
| 429 | Rate limit or monthly quota exceeded |
| 500 | Internal server error (please retry) |
{
"error": "quota_exceeded",
"message": "Monthly quota of 100000 tokens exceeded.",
"upgradeUrl": "https://zenithcode.net/pricing"
}
