# ERC-20 Token Allowance Lookup

> ERC-20 Token Allowance Lookup is a paid API for AI agents from store.agentexchange.work, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Returns the current ERC-20 token allowance that a spender is approved to transfer on behalf of a token owner on a specified blockchain.

## Facts

- Endpoint: GET https://store.agentexchange.work/chain/allowance
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/erc-20-token-allowance-lookup-b51e243d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_C1iQM0AJh6bs9mN2x6hZj

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability erc-20-token-allowance-lookup-b51e243d
```

Example prompt: What's the current USDC allowance that Uniswap's router (0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD) is approved to spend from my wallet 0xAbC123...4567 on Base?

## When to prefer this

Use this endpoint when you need a quick, no-auth, pay-per-call on-chain read of an ERC-20 token allowance without setting up a node or API key. Ideal for AI agents operating in DeFi workflows on Base, Ethereum, Optimism, Arbitrum, Polygon, or Gnosis that need to verify approval state before executing swaps, transfers, or other protocol interactions.

## Known failure modes

- Invalid or malformed wallet/contract address returns 400 error
- Unsupported chain name returns error or defaults to Base
- Token contract that is not a valid ERC-20 may return zero or error
- Network timeout if RPC node is unavailable
- Zero allowance returned when no approval has been set (not an error, just correct state)

## How this service works

How much of an ERC-20 token a spender is approved to move from an owner's wallet, via allowance, across Base, Ethereum, Optimism, Arbitrum, Polygon, Gnosis. The approval read every DeFi, swap and trading agent makes before (and after) a transaction to know if an approve is needed. Live public RPC; one paid call.

## Output

Returns a JSON object with the chain name, owner address, token address, spender address, token decimals, human-readable allowance amount (e.g. 1000.0), and raw allowance string in base units (e.g. '1000000000' for 1000 USDC with 6 decimals).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "token",
      "owner",
      "spender"
     ],
     "properties": {
      "chain": {
       "type": "string",
       "description": "base|ethereum|optimism|arbitrum|polygon|gnosis (default base)"
      },
      "owner": {
       "type": "string",
       "description": "Token owner wallet (0x...)"
      },
      "token": {
       "type": "string",
       "description": "ERC-20 token contract (0x...)"
      },
      "spender": {
       "type": "string",
       "description": "Approved spender address (0x...)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "allowance": {
       "type": "number"
      },
      "raw_allowance": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/erc-20-token-allowance-lookup-b51e243d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from store.agentexchange.work](https://www.zero.xyz/host/store.agentexchange.work/llms.txt)
