Help Center/API Documentation

API Documentation

API: Error Codes Reference

Complete list of Ghost Exchange API error codes, meanings, and how to handle them.

API Error Codes

When an API request fails, a JSON error response is returned with an HTTP status code.

Response Format

{
  "error": "error_code",
  "message": "Human-readable description"
}

Error Codes

400 — Bad Request

CodeMeaningFix
invalid_pairThe from/to pair is not supportedCheck /pairs endpoint
invalid_addressDestination address is malformedVerify address format
invalid_amountAmount is below minimum or invalidCheck minimum for the pair
invalid_rate_typeRate type must be "float" or "fixed"Use "float" or "fixed"
missing_fieldA required field is missingCheck request body

401 — Unauthorized

CodeMeaningFix
invalid_api_keyAPI key is invalid or revokedCheck your API key
missing_api_keyNo X-API-Key header providedAdd the header

404 — Not Found

CodeMeaningFix
order_not_foundThe order ID doesn't existVerify the order ID
pair_not_foundThe requested pair doesn't existCheck /pairs endpoint

429 — Rate Limited

CodeMeaningFix
rate_limitedToo many requestsWait and retry, check X-RateLimit headers

500 — Server Error

CodeMeaningFix
internal_errorSomething went wrong on our endRetry after a few seconds
service_unavailableMaintenance or temporary outageCheck /status or retry later

Retry Strategy

For 429 and 500 errors, implement exponential backoff:

1. Wait 1 second, retry

2. Wait 2 seconds, retry

3. Wait 4 seconds, retry

4. After 3 failures, surface the error to the user

Need Help?

If you encounter persistent errors, contact Support with:

  • The error code and message
  • Your request (redact the API key)
  • Timestamp of the request

Ghost Support

Available

Need help?

Start a live chat with our support team. Your conversation persists across pages.