Error Codes¶
This document describes the error codes returned by LiquidMesh APIs, including common error codes and endpoint-specific ones.
API Response Format¶
{
"data": {},
"code": 0,
"message": "OK"
}
Common Error Codes¶
These codes apply to all endpoints.
Error code range 40001–40099 is reserved for common errors.
| HTTP Status | Code | Message | Description |
|---|---|---|---|
| 200 | 0 | OK | Request successful |
| 400 | 40001 | Rate limited | Too many requests, please retry later |
/quote Error Codes¶
| HTTP Status | Code | Message | Description |
|---|---|---|---|
| 400 | 40001 | Rate Limited | API Key Reached Rate Limit |
| 400 | 40101 | Invalid input | Required parameter missing or invalid |
| 400 | 40102 | Path not found | quote path not found, may be unsupported dex |
| 400 | 40103 | Amount In Too Small | amountIn too small |
| 400 | 40104 | Insufficient liquidity | Insufficient liquidity |
| 400 | 40105 | No liquidity | No liquidity |
| 400 | 40106 | Price Impact Too High | Price Impact Too High |
| 400 | 42102 | Path Not Found | the requested URL was not found |
| 400 | 42103 | Invalid API Key | invalid api key |
| 400 | 42104 | Invalid IP | invalid api |
| 500 | 50001 | Internal error | Unexpected server-side error |
/swap Error Codes¶
| HTTP Status | Code | Message | Description |
|---|---|---|---|
| 500 | 50001 | Internal Server Error | Unexpected server-side error |
| 500 | 51002 | Get Data Error | Unexpected error |
| 400 | 40001 | Rate Limited | API Key Reached Rate Limit, need to upgrade |
| 400 | 40101 | Invalid input | Required or formatted parameter is invalid or missing |
| 400 | 41102 | InsufficientFundsForRent | Account lacks funds to pay rent (e.g., on Solana) |
| 400 | 41103 | InsufficientFunds | General lack of funds for the swap |
| 400 | 41104 | InvalidAccountForFee | Fee account is missing or incorrect setup |
| 400 | 41105 | AccountNotFound | Required account does not exist on-chain |
| 400 | 41106 | Insufficient Liquidity | Insufficient Liquidity |
| 400 | 41107 | Outdated Params | Outdated Params |
| 400 | 41108 | Timestap Outdated | Timestap Outdated |
| 400 | 41201 | Min return not reached | Expected minimum output amount wasn't met |
| 400 | 41202 | amount_in must be greater than 0 | Input amount must be a positive value |
| 400 | 41203 | min_return must be greater than 0 | Minimum return must be positive |
| 400 | 41204 | invalid expect amount out | Expected output amount is invalid |
| 400 | 41205 | amounts and routes must have the same length | Mismatch between token amounts and route steps |
| 400 | 41206 | total_amounts must be equal to amount_in | Total distributed across paths doesn't match input |
| 400 | 41207 | dexes and weights must have the same length | DEX list and weight list lengths don't match |
| 400 | 41208 | weights must sum to 100 | Weights across path must total 100 (percentage) |
| 400 | 41211 | Invalid commission rate | Commission rate out of allowed range |
| 400 | 41212 | Invalid commission token account | Commission recipient account is invalid |
| 400 | 41213 | Invalid accounts length | Incorrect number of accounts provided |
| 400 | 41218 | Invalid program id | Specified on-chain program/ID is not valid |
| 400 | 41219 | Invalid pool | Liquidity pool doesn't exist or is invalid |
| 400 | 41220 | Invalid token mint | Token mint address is incorrect |
| 400 | 41221 | insufficient funds | Not enough funds to complete the swap |
| 400 | 41222 | exceeds desired slippage limit | Requested slippage is over allowed threshold |
| 400 | 41223 | The program expected this account to be already initialized | Account must be initialized before use |
| 400 | 41224 | Transfer: insufficient lamports | Insufficient SOL to complete required transfer |
| 400 | 41225 | Account Is Frozen | account is frozen, only for sol |
| 400 | 41226 | insufficient funds for instruction | insufficient funds, only for sol |
| 400 | 41301 | minReturn not reached | minReturn not reached, only for evm |
| 400 | 41302 | code expired | swap parameter has timed out and needs to be requested again, for evm |
| 400 | 41303 | insufficient balance | account does not have enough balance, for evm |
| 400 | 41304 | insufficient funds for gas | the account balance is insufficient to pay the gas fee, for evm |
| 400 | 41305 | transfer failed | transfer failed, it may be due to insufficient balance, lack of approval, or special logic of token, for evm |
| 400 | 41306 | swap failed | swap failed only for tron |
| 400 | 41307 | insufficient allowance | the approve operation was not performed, only for evm |
| 400 | 41308 | invalid customized info | invalid fourmeme customized info from adapter |
| 400 | 41309 | insufficient liquidity | evm pool insufficient liquidity |
| 400 | 41310 | illegal amount | evm parameter error, invalid amountIn |
| 400 | 41311 | simulate failed | evm other simulate error, only for testMode |
| 400 | 42102 | Path Not Found | the requested URL was not found |
| 400 | 42103 | Invalid API Key | invalid api key |
| 400 | 42104 | Invalid IP | invalid api |
| 500 | 51101 | invalid msg value | quote input error: value doesn't match required amount |
| 500 | 51102 | length mismatch | quote input error: batches and amounts don't match |
| 500 | 51103 | zero address | quote input error: receiver is zero address |
| 500 | 51104 | illegal fromToken amount | quote input error: fromTokenAmount in baseRequest must bigger than 0 |
| 500 | 51105 | illegal sum of batchAmount | quote input error: sum of batches amount must less than fromTokenAmount in baseRequest |
| 500 | 51106 | illegal totalWeight | quote input error: sum of weight in every batch can not exceed 10000 limit |
| 500 | 51107 | commission rate limit | quote input error: commission rate exceeds limit 300 |
| 500 | 51108 | illegal callback | error caller searched by factory from adapter, error from lm contract |
| 500 | 51109 | testMode fetch flot failed | setting balance and bypassing approval failed, only for evm open testMode |
| 500 | 51110 | native error: internal error | native firm quote api error |
| 500 | 51111 | native error: need refresh quote to swap | native firm quote api issue, the quote path may have expired, need refresh quote to swap |
Note: For a one-click experience, the Flash API handles quote and swap together via the POST /v1/{networkId}/order endpoint. For more control, use the Trade API’s Quote + Swap endpoints separately.