# ERC-20 Allowance Checker

> ERC-20 Allowance Checker is a paid API for AI agents from ai-policy-kit.moneymaker-ai.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-19).

Returns the current ERC-20 token allowance granted by an owner address to one or more spender addresses on a given EVM chain

## Facts

- Endpoint: GET https://ai-policy-kit.moneymaker-ai.workers.dev/api/erc20-allowance?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/erc-20-allowance-checker-bdba5fe4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zctSVjEbQOzjya98vGUzF

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-allowance-checker-bdba5fe4
```

Example prompt: Check the USDC allowance on Base that my wallet 0x5b4Ca59741DE12DC212982b342392a063492a021 has granted to the spender 0x000000000022D473030F116dDEE9F6B43aC78BA3 for the token contract 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913.

## When to prefer this

Use this endpoint when you need to programmatically check ERC-20 token allowances for a specific wallet on any major EVM chain (Base, Ethereum, Arbitrum, Optimism, Polygon, BSC, Gnosis, Celo). It supports batch spender lookups (up to 10 addresses) and returns rich metadata including unlimited-approval flags and risky allowance detection, making it ideal for wallet security audits and DeFi pre-flight checks.

## Known failure modes

- Invalid or malformed 0x address returns an error or empty result
- Unsupported chain name (not in enum) results in a 400 error
- Token contract address that is not a valid ERC-20 returns an error
- Network or RPC timeout may cause a 500 error
- More than 10 comma-separated spenders may be rejected

## How this service works

Generate an AI_POLICY.md and a pull request template with an AI-disclosure section for your open-source repo. Free, runs in your browser.

## Output

Returns a JSON object with the current block number, chain info, token symbol, decimals, owner balance, and an array of allowances per spender — each including the allowance amount (human-readable and raw), a flag for unlimited approvals, spender type, and whether the allowance exceeds the owner's current balance. Also surfaces a 'risky' array of flagged allowances.

## 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": [
      "chain",
      "token",
      "owner",
      "spender"
     ],
     "properties": {
      "chain": {
       "enum": [
        "base",
        "ethereum",
        "bsc",
        "arbitrum",
        "optimism",
        "polygon",
        "gnosis",
        "celo"
       ],
       "type": "string"
      },
      "owner": {
       "type": "string",
       "description": "0x owner address"
      },
      "token": {
       "type": "string",
       "description": "0x ERC-20 contract"
      },
      "spender": {
       "type": "string",
       "description": "0x spender, or up to 10 comma-separated"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "block": 52787302,
  "chain": "base",
  "owner": "0x5b4Ca59741DE12DC212982b342392a063492a021",
  "risky": [],
  "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "symbol": "USDC",
  "chainId": 8453,
  "decimals": 6,
  "allowances": [
   {
    "read_ok": true,
    "spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
    "allowance": "0",
    "unlimited": false,
    "spender_type": "contract",
    "allowance_raw": "0",
    "exceeds_balance": false
   }
  ],
  "owner_balance": "2.002",
  "owner_balance_raw": "2002000"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/erc-20-allowance-checker-bdba5fe4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ai-policy-kit.moneymaker-ai.workers.dev](https://www.zero.xyz/host/ai-policy-kit.moneymaker-ai.workers.dev/llms.txt)
