Skip to main content

Error Response Format

All API errors follow a consistent JSON format:
The HTTP status code indicates the error category, and the error message provides specific details.

HTTP Status Codes

Success Codes

OK
Request successful, data returned

Client Error Codes

Bad Request
The request was malformed or contains invalid parametersCommon causes:
  • Missing required query parameters
  • Invalid ticker_id format
  • Malformed request body
Not Found
The requested resource does not existCommon causes:
  • Invalid endpoint path
  • Ticker not found
  • DAO does not exist
Too Many Requests
Rate limit exceededDetails:
  • Limit: 60 requests per minute per IP
  • Reset: Wait until the next minute window

Server Error Codes

Internal Server Error
An unexpected error occurred on the serverCommon causes:
  • RPC connection issues
  • Blockchain data unavailable
  • Service temporarily down
Bad Gateway
Upstream service (RPC) is unavailable
Service Unavailable
API is temporarily unavailable (maintenance or overload)

Common Error Scenarios

Rate Limit Exceeded

When you exceed 60 requests per minute:
Solution:
1

Implement Retry Logic

Wait 60 seconds before retrying
2

Use Exponential Backoff

Gradually increase wait time between retries
3

Cache Responses

Store frequently accessed data locally
Example Implementation:

Ticker Not Found

When requesting a specific ticker that doesn’t exist:
Solutions:
  • Verify the ticker_id format: {BASE_MINT}_{QUOTE_MINT}
  • Ensure both mint addresses are valid Solana PublicKeys
  • Check if the DAO is excluded via EXCLUDED_DAOS
  • Verify the DAO has active pools with reserves

RPC Connection Issues

When the Solana RPC is unavailable:
Solutions:

Check RPC Status

Verify your RPC provider is operational

Use Fallback RPC

Configure multiple RPC endpoints

Upgrade RPC Tier

Use a premium RPC provider

Retry Request

Implement automatic retry logic

Invalid Configuration

When required environment variables are missing:
Solution: Ensure all required environment variables are set in your .env file:

Error Handling Best Practices

Never assume requests will succeed. Wrap all API calls in try-catch blocks.
Set reasonable timeouts to prevent hanging requests.
Implement exponential backoff for transient errors.See code examples above for implementation details.
Cache successful responses to reduce API load and improve resilience.
Log all errors for debugging and monitoring.

Monitoring API Health

Use the health check endpoint to monitor API status:
Healthy Response:
Set up automated health checks every 1-5 minutes to detect issues early.

Getting Support

If you encounter persistent errors:

API Overview

Review API documentation for proper usage

GitHub Issues

Report bugs or request features

Discord Support

Get help from the community

Configuration Guide

Check configuration settings

Error Response Examples