Skip to main content

Error Codes

All error responses use the same format:
{
  "success": false,
  "error": "error message"
}

HTTP status codes

CodeMeaningWhen
200SuccessRequest processed successfully
400Bad RequestInvalid parameters, missing required fields, insufficient liquidity
404Not FoundNo route or pool found for the given parameters
429Too Many RequestsRate limit exceeded
500Internal Server ErrorTransaction build failed, simulation error, or unexpected server issue

API errors

Quote errors (GET /api/v1/quote)

Error messageHTTPCause
invalid inputMint400inputMint is not a valid base58 public key
invalid outputMint400outputMint is not a valid base58 public key
invalid amount400Amount is not a valid positive number
invalid swapMode400swapMode must be ExactIn or ExactOut
no route found404No viable swap path exists
no pool found404No liquidity pool exists for one of the required hops
insufficient liquidity400Pools exist but don’t have enough liquidity for the requested amount

Swap errors (POST /api/v1/swap)

Error messageHTTPCause
invalid user wallet400userWallet is not a valid base58 public key
All quote errors above400/404Same causes as quote endpoint
simulation failed: ...500Transaction simulation failed (details in message)
failed to build transaction500Internal error building the transaction

Instructions errors (POST /api/v1/instructions)

Error messageHTTPCause
invalid user wallet400userWallet is not a valid base58 public key
All quote errors above400/404Same causes as quote endpoint
failed to build instructions500Internal error building the instructions
missing pool data500Pool account data unavailable (temporary)

Simulation result errors

When skipSimulation is false, the swap response includes a simulation object:
FieldTypeMeaning
successbooleanWhether simulation passed
errorstringError message if simulation failed
insufficientFundsbooleanWallet doesn’t have enough balance
slippageExceededbooleanPrice moved beyond tolerance
computeUnitsConsumedintegerCompute units (CU) used during simulation
logsstring[]Program log output

On-chain errors

These errors occur after submitting a signed transaction to Solana:
ErrorCauseRecovery
SlippageExceededPrice changed between build and executionGet a new quote and rebuild
InsufficientFundsBalance changed after simulationVerify balance, then retry
BlockhashExpiredTransaction wasn’t confirmed in timeRebuild with fresh blockhash
InvalidAccountDataPool state changedGet a new quote (pool may have been migrated)