Skip to content

Error Codes

All errors follow the standard JSON-RPC error format:

{
  "id": 1,
  "error": {
    "code": "bad_request",
    "message": "human-readable description"
  }
}

Error Codes

Code Category Description
bad_request Client Malformed or invalid request (bad params, invalid asset, BCH↔BCH trade, bad amount format)
route_failed Routing Valid request, but no pools or no fill at this trade size
insufficient_funds Build Funding inputs cannot cover outputs + miner fee
build_failed Build The transaction could not be assembled safely and was refused
slippage Build Expected output below min_output slippage floor
rate_limited Access Per-connection rate limit exceeded
unknown_method Client Request method not recognized
internal Server Internal error (should not happen; report if it does)

Subscription Errors

For route.subscribe, errors can also arrive as route.update notifications when the route becomes unroutable after the initial subscription:

{
  "method": "route.update",
  "error": {
    "code": "route_failed",
    "message": "no cauldron pools for token"
  }
}

This happens when a snapshot change (pool spend, reorg) makes the route no longer fillable. The subscription remains active — the server will push a success notification if the route becomes routable again.