Skip to main content
GET https://api.trustware.io/api/v1/sdk/rpc/evm/allowance Returns the ERC-20 allowance an ownerAddress has granted to a spenderAddress on a specific EVM chain. Trustware proxies the underlying call so you don’t have to manage public RPC endpoints or rate limits per chain. Use this before broadcasting a route transaction whose source token is an ERC-20. If allowance is below fromAmount, prompt the user to approve the spender first.
The spender is always a provider contract, never a Trustware contract. When the route response includes route.execution.approvals, each entry is authoritative for one allowance: check against its spender, not against route.execution.transaction.to. Re-quoting can change the selected provider and therefore the required allowances, so read them from the latest POST /route response. See token approvals.

Query parameters

Request

Response

Errors

The endpoint returns { "success": false, "error": "...", ... } for validation failures (invalid address, unsupported chain) or upstream RPC failures. Inspect the HTTP status code alongside the error payload:
  • 400: malformed address, unsupported chain, or missing query parameter.
  • 429: rate limit hit; honor the Retry-After header.
  • 500 / 502: upstream RPC failed after retries.
Compare allowance to the amount on the matching route.execution.approvals entry, or to your route’s fromAmount when no approvals are returned (both in the token’s smallest unit). If the allowance is lower, prompt the user to approve the spender before broadcasting.