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 StatusCodeMessageDescription
2000OKRequest successful
40040001Rate limitedToo many requests, please retry later

/quote Error Codes

HTTP StatusCodeMessageDescription
40040001Rate LimitedAPI Key Reached Rate Limit
40040101Invalid inputRequired parameter missing or invalid
40040102Path not foundquote path not found, may be unsupported dex
40040103Amount In Too SmallamountIn too small
40040104Insufficient liquidityInsufficient liquidity
40040105No liquidityNo liquidity
40040106Price Impact Too HighPrice Impact Too High
40042102Path Not Foundthe requested URL was not found
40042103Invalid API Keyinvalid api key
40042104Invalid IPinvalid api
50050001Internal errorUnexpected server-side error

/swap Error Codes

HTTP StatusCodeMessageDescription
50050001Internal Server ErrorUnexpected server-side error
50051002Get Data ErrorUnexpected error
40040001Rate LimitedAPI Key Reached Rate Limit, need to upgrade
40040101Invalid inputRequired or formatted parameter is invalid or missing
40041102InsufficientFundsForRentAccount lacks funds to pay rent (e.g., on Solana)
40041103InsufficientFundsGeneral lack of funds for the swap
40041104InvalidAccountForFeeFee account is missing or incorrect setup
40041105AccountNotFoundRequired account does not exist on-chain
40041106Insufficient LiquidityInsufficient Liquidity
40041107Outdated ParamsOutdated Params
40041108Timestap OutdatedTimestap Outdated
40041201Min return not reachedExpected minimum output amount wasn't met
40041202amount_in must be greater than 0Input amount must be a positive value
40041203min_return must be greater than 0Minimum return must be positive
40041204invalid expect amount outExpected output amount is invalid
40041205amounts and routes must have the same lengthMismatch between token amounts and route steps
40041206total_amounts must be equal to amount_inTotal distributed across paths doesn't match input
40041207dexes and weights must have the same lengthDEX list and weight list lengths don't match
40041208weights must sum to 100Weights across path must total 100 (percentage)
40041211Invalid commission rateCommission rate out of allowed range
40041212Invalid commission token accountCommission recipient account is invalid
40041213Invalid accounts lengthIncorrect number of accounts provided
40041218Invalid program idSpecified on-chain program/ID is not valid
40041219Invalid poolLiquidity pool doesn't exist or is invalid
40041220Invalid token mintToken mint address is incorrect
40041221insufficient fundsNot enough funds to complete the swap
40041222exceeds desired slippage limitRequested slippage is over allowed threshold
40041223The program expected this account to be already initializedAccount must be initialized before use
40041224Transfer: insufficient lamportsInsufficient SOL to complete required transfer
40041225Account Is Frozenaccount is frozen, only for sol
40041226insufficient funds for instructioninsufficient funds, only for sol
40041301minReturn not reachedminReturn not reached, only for evm
40041302code expiredswap parameter has timed out and needs to be requested again, for evm
40041303insufficient balanceaccount does not have enough balance, for evm
40041304insufficient funds for gasthe account balance is insufficient to pay the gas fee, for evm
40041305transfer failedtransfer failed, it may be due to insufficient balance, lack of approval, or special logic of token, for evm
40041306swap failedswap failed only for tron
40041307insufficient allowancethe approve operation was not performed, only for evm
40041308invalid customized infoinvalid fourmeme customized info from adapter
40041309insufficient liquidityevm pool insufficient liquidity
40041310illegal amountevm parameter error, invalid amountIn
40041311simulate failedevm other simulate error, only for testMode
40042102Path Not Foundthe requested URL was not found
40042103Invalid API Keyinvalid api key
40042104Invalid IPinvalid api
50051101invalid msg valuequote input error: value doesn't match required amount
50051102length mismatchquote input error: batches and amounts don't match
50051103zero addressquote input error: receiver is zero address
50051104illegal fromToken amountquote input error: fromTokenAmount in baseRequest must bigger than 0
50051105illegal sum of batchAmountquote input error: sum of batches amount must less than fromTokenAmount in baseRequest
50051106illegal totalWeightquote input error: sum of weight in every batch can not exceed 10000 limit
50051107commission rate limitquote input error: commission rate exceeds limit 300
50051108illegal callbackerror caller searched by factory from adapter, error from lm contract
50051109testMode fetch flot failedsetting balance and bypassing approval failed, only for evm open testMode
50051110native error: internal errornative firm quote api error
50051111native error: need refresh quote to swapnative 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.