Skip to content

GuidesErrors and limits

Swaps

Errors and limits

HTTP errors

Every error is JSON:

{ "error": "slippageBps must be 0..5000", "requestId": "3f1c9b9e-…" }
StatusTypical errorMeaningWhat to do
400invalid in / invalid recipient / amount must be a positive integer in base units / in and out must differ / slippageBps must be 0..5000 / minOut is required…Bad inputFix the request. Not retryable
401invalid API keyAn Authorization header with an unknown keyFix or remove the key
404no routeNo path of ≤3 swaps between the tokens, or every candidate quoted 0Try another pair or a smaller amount
404unknown token (not in any indexed pool)/tokens/{address} for a token with no pool—
422honeypot: this token can be bought but not soldThe output token failed the probeDon't trade it
429Rate limit exceeded, retry in 1 minuteToo many requestsWait retry-after seconds; get a partner key
503indexer still backfillingThe instance just started and hasn't loaded all pools yetRetry in a few seconds; poll /v1/health until ready
503EXECUTOR_ADDRESS not configured / ORDERBOOK_ADDRESS / EXECUTOR_ADDRESS not configuredThe operator hasn't configured that contract—
500internal errorUnexpected failure (usually the RPC)Retry once; report the requestId

Internal error details are never returned (they can contain the RPC URL or keys); they're logged server-side under the request id.

A 200 that you should not send

A 200 quote can still carry a transaction that would fail. Always check:

FieldBad valueMeaning
simulation.okfalseThe exact tx reverts from sender right now; simulation.error says why
tx.warningpresentSame thing, on the tx itself
approvalnot nullApprove first, then re-quote
warningsnon-emptyImpersonator, taxes, launchpad… Show them to the user

On-chain reverts

If the transaction was sent anyway, or the market moved between quote and inclusion:

Contract errorCause
Expired()Mined after deadline (quote + 5 min)
InsufficientOutput(amountOut, minOut)Price moved beyond the slippage tolerance
PartialFill()A pool hit its price limit and couldn't take the whole input
InvalidRoute()Malformed splits (legs don't add up to amountIn, wrong token chain, zero recipient)
InvalidNativeConfig()wrappedNative isn't allow-listed
IsPaused()The operator paused swaps (emergency stop)
TransferFailed()A token transfer or native send failed (blocked token, recipient can't receive HYPE)
Unauthorized()A callback came from a contract that isn't the active pool (only seen in attacks)

OrderBook: InvalidOrder() (bad parameters, zero minOutPerSlice), NotFillable() (not due, expired or empty), Unauthorized() (non-keeper fill, non-owner cancel before expiry).

Limits

LimitValue
Public rate limitRATE_LIMIT_PER_MIN per IP (default 120/min)
Partner rate limitPer key (default 10× public)
Request timeout20 s server-side. Use a 10–20 s client timeout
Swaps per route3 (plus one WHYPE rewrap)
Split legs3, pool-disjoint
Split granularity5%
slippageBps0–5000
/price ids100 per request
/tokens limit500
/history limit200
WebSocket subscriptions100 ids per socket
Order slices1–1000, and at most one slice per base unit of input
Quote deadline300 s

Retries

  • Retry 429 (after retry-after), 503, 500, and network errors: once or twice, with backoff.
  • Don't retry 400, 401, 404, 422 unchanged.
  • Re-quote rather than re-send when a transaction reverts with Expired or InsufficientOutput.

Next: Limit orders and DCA

lane.markets · Make the most of every move.