Orkid

Error & retry guide

Error codes, causes, and retry strategies.

Error reference

HTTP / okLikely causeRecommended action
400 / ok:falseInvalid request shapeFix the JSON, check fromDecimals, toDecimals, chain
401 / Invalid or revoked API keyBad/missing key or rate limitCheck X-ORKID-API-Key header, request a key rotation
403 / Missing anti-scraping tokenBrowser request without page tokenUse an API key instead
200 / error: "Swap too small..."Below gasless minimumIncrease amount or set dryRun: true and have user pay gas
200 / error: "Gas estimation failed"Permit/signature/calldata will revertCheck token approval, nonce, spender, chain, token addresses, balance
200 / error: "Invalid nonce"Nonce already usedCall findUnusedNonce again
200 / error: "TRANSFER_FROM_FAILED"Insufficient allowance or balanceCheck token.approve(PERMIT2, ...) and balanceOf
200 / error: "Price impact too high..."Slippage exceeds max (500 bps)Try a smaller amount or a different token pair

Retry rules

  • Retry 5xx up to 3 times with exponential backoff.
  • Do not blindly retry a successful /solve (ok: true) — it may have already submitted.
  • For dryRun: false, if the solver returns ok: true with transaction.txHash, the swap is submitted.
  • For dryRun: true, cache the returned data and submit it with sendTransaction only once.
  • In the sandbox, retries are safe — no transaction is ever submitted.

Common issues

Gas estimation failed

This usually means the Permit2 signature, nonce, or spender is wrong. Check:

  1. The spender in the signed message matches the TVMExecutor for the target chain.
  2. The token is approved to Permit2 (0x000000000022D473030F116dDEE9F6B43aC78BA3).
  3. The nonce hasn't been used (read the nonce bitmap on-chain).
  4. The user has sufficient balance of the input token.
  5. The deadline in the permit hasn't passed.

Price impact too high

The solver rejects swaps with price impact above 500 bps (5%). Try a smaller amount or a different token pair with deeper liquidity.

Swap too small for gasless

Each chain has a minimum notional for gasless execution (the solver pays gas). Below that, the swap still works but the user pays gas. See minimum notional.

On this page