Skip to main content

Error Response Format

All API errors return a JSON body with a detail field:
Standard HTTP status codes are used:

Common Errors

Vault Not Found (404)

The vault ID is invalid. Use GET /v1/vaults to get valid vault IDs.

No Route Found (400)

LiFi could not find a swap/bridge path. Common causes:
  • Token not supported on the source chain
  • Amount too small to bridge
  • Liquidity unavailable for this pair
Fix: Try a different source token, increase the amount, or try a different source chain.

Zero Output Amount (400)

The input amount is too small to produce any output after slippage. Fix: Increase the deposit amount.

Contract Calls Quote Unavailable (400)

The selected bridge doesn’t support destination-chain contract calls, which are required for the deposit. Fix: Try depositing from a different source chain, or use the vault’s native chain.

No Deposit Router (400)

The specified chain doesn’t have a deposit router deployed. See the contract addresses for deployed chains.

Validation Error (422)

A required field is missing or has an invalid type. Check the request body against the API reference.

Best Practices

  1. Always check for approval - It can be null for native token deposits
  2. Handle quote expiry - Quotes can become stale. If the build fails, fetch a new quote
  3. Poll with backoff - For status checks, start at 15s intervals. Don’t poll faster than every 10 seconds
  4. Show the LiFi explorer link - Give users tracking.lifi_explorer so they can independently track their bridge transfer