Validation errors
| Error | HTTP status | Description |
|---|---|---|
| Swaps not enabled | 403 | Swaps are not enabled for your app. Enable swaps in the Privy Dashboard. |
| Unsupported chain | 400 | The caip2 chain identifier is not a supported chain. |
| Same input and output token | 400 | The input_token and output_token must be different. |
| Non-EVM wallet | 400 | Only EVM wallets are supported for swap operations. |
| Gas sponsorship not enabled | 400 | Gas sponsorship is required but not enabled for your app. |
| Insufficient token balance | 400 | The wallet does not have enough of the input token to cover the swap amount. Returned for exact_input swaps only. |
Routing errors
| Error | HTTP status | Description |
|---|---|---|
| No quotes available | 400 | No swap route could be found for the given token pair, amount, or chain. This can occur if the token pair lacks liquidity or the token address is invalid on the specified chain. |
| Token or route not found | 404 | The specified token or swap route does not exist. Verify that the token addresses are correct for the target chain. |
| Rate limited | 429 | The request was rate limited. Retry after a brief delay. |

