Skip to main content
The REST API uses standard HTTP status codes and returns JSON error objects with detail about what went wrong.

Error Response Format

All error responses have the same shape:
{
  "status": "failed",
  "message": "Human-readable error description"
}
The status field is one of:
StatusMeaning
failedGeneric error
timeoutQuery execution timed out
notFoundRequested resource does not exist

Examples

Bad request (400):
{
  "status": "failed",
  "message": "Bad Request: missing required parameter 'market'"
}
Not found (404):
{
  "status": "notFound",
  "message": "Market not found"
}
Timeout (504):
{
  "status": "timeout",
  "message": "Query execution timed out. Please try a more specific query or reduce the time range."
}
Internal error (500):
{
  "status": "failed",
  "message": "Service temporarily unavailable. Please try again later."
}

HTTP Status Codes

StatusMeaning
200Success
400Bad Request: Invalid parameters
401Unauthorized: Missing or invalid token
403Forbidden: Token lacks required scope
404Not Found: Resource doesn’t exist
429Too Many Requests: Rate limit exceeded
500Server Error: Something went wrong on our end
504Gateway Timeout: Query took too long

Best Practices

  1. Implement exponential backoff for 500/504 errors
  2. Cache responses where appropriate
  3. Batch requests when possible
  4. Use WebSocket for real-time data instead of polling

SDK Error Handling

See TypeScript SDK Error Responses for SDK-specific error handling.

Authentication

How to get and use bearer tokens

REST Overview

API basics and available endpoints