Swap API - Error Messages
This document provides a list of possible error messages that may occur for the Swap API
General Errors
Internal Error
{ "error": "An internal error occurred" }
Explanation: This error indicates that an unexpected issue occurred within the api. Solution: Retry or contact support if the problem persists.
Invalid or Missing Token Address
{
"error": "Invalid or missing 'from' or 'to' token address"
}
Explanation: The addresses for either the source ("from") token or the destination ("to") token are either missing or invalid. Solution: Double-check that you've provided valid addresses for both the source and destination tokens.
Invalid Amount
{ "error": "Invalid amount" }
Explanation: The amount specified for the token swap is not valid. Solution: Ensure you're entering a valid number for the amount you wish to swap. The amount should be greater than zero
Invalid Slippage Tolerance
{
"error": "Invalid slippage tolerance (should be between 0 and 100%)"
}
Explanation: The specified slippage tolerance is outside the acceptable range. Solution: Set a slippage tolerance between 0% and 100%. Common values are typically between 0.1% and 10%.
Swap-related Errors
Unable to Fetch Pools
{
"error": "Failed to swap",
"details": "Unable to fetch pools for token"
}
Explanation: The system couldn't retrieve information about liquidity pools for the specified token. Solution: Verify that the token address is correct and that the token is supported on the platform. Try again later if the issue persists or contact support
No Pools for Token
{
"error": "Failed to swap",
"details": "Token has no pools"
}
Explanation: There are no liquidity pools available for the specified token. Solution: Check if the token is newly listed or has no liquidity (rug).
No Liquidity in Pools
{
"error": "Failed to swap",
"details": "No pools with liquidity found"
}
Explanation: While pools exist for the token, none of them currently have sufficient liquidity for the swap. Solution: Try swapping a smaller amount, or wait for more liquidity to be added to the pools.
If you encounter any of these errors, please try the suggested solutions. If problems persist, contact our support team for further assistance.