LayerHopdocs

Error codes

AMOUNT_TOO_SMALL

Amount too small: The input amount is zero or below the provider's minimum.

Open in ClaudeOpen in ChatGPT
HTTP status Retry
400 no

Where it comes from: GET /v1/quote (amount 0); also mapped from provider errors (for example Relay AMOUNT_TOO_LOW).

Causes#

  • amount is "0".
  • The amount does not cover the route's fixed costs (bridge fees, destination gas).
  • The amount was sent in human units instead of base units ("1" USDC means 0.000001 USDC).

How to fix#

  • Send base units: 1 USDC is "1000000" (6 decimals), 1 SOL is "1000000000" (9 decimals).
  • Increase the amount; cross-chain routes need more than same-chain swaps.

Example response#

JSON
{
  "error": {
    "code": "AMOUNT_TOO_SMALL",
    "message": "amount must be > 0",
    "requestId": "0d5e1f6a-3b2c-4d1e-8f9a-7b6c5d4e3f21",
    "docsUrl": "https://docs.layerhop.com/errors/AMOUNT_TOO_SMALL"
  }
}

See Error handling & retries for a retry strategy, and the error catalog for every code.