Response Format
All v2 error responses follow this shape:Special Response Shapes
Validation errors include afields object with per-field details:
Error Codes by Endpoint
GET /v2/quotes
POST /v2/exchanges
GET /v2/orders/{houdiniId} and GET /v2/orders
Global Errors (all endpoints)
These can be returned by any endpoint:HTTP Status Summary
Best Practices
- Match on
code, notmessage— Thecodefield is a stable string enum. Messages may contain dynamic values and can change without notice. - Use regex for dynamic messages — For codes like
QUOTE_OVER_LIMIT,AMOUNT_TOO_LOW,SWAP_AMOUNT_IS_OUT_OF_BOUNDS, extract the dynamic part with a regex: - Handle 422 as your primary error status — Most business logic errors return 422, not 400 or 500.
- Respect
retryAfter— On 429 responses, wait the specified number of seconds before retrying. Themetaobject provides additional context about which limit was hit. - Log
requestId— Always log therequestIdfrom error responses. Include it when contacting support for faster debugging. - Implement exponential backoff for 500/503 — These are transient errors. Retry with backoff (e.g. 1s, 2s, 4s) up to 3 attempts.
- Don’t retry 422 errors — These are deterministic. The same request will produce the same error. Fix the input before retrying.
Need Help?
API v2 Reference
Complete endpoint documentation
Order Lifecycle
Understand order states
Quick Start
Integration guides for each swap type
Contact Support
Get help with specific issues