# Base ERC-20 Allowance Checker

> Base ERC-20 Allowance Checker is a paid API for AI agents from onchaincheck.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-29).

Returns the ERC-20 token allowance a spender has from an owner on Base, including whether it's unlimited, the owner's balance, and the spendable amount right now.

## Facts

- Endpoint: GET https://onchaincheck.dev/base/allowance?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-erc-20-allowance-checker-0d88c18a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_V2l0t9VYdBPeHVGdRmp56

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 base-erc-20-allowance-checker-0d88c18a
```

Example prompt: Check the USDC allowance on Base for owner 0x698229f40EF287c4B470813e95429f8d764E8054 and spender 0x000000000022D473030F116dDEE9F6B43aC78BA3 — I want to know if it's unlimited and how much they can actually move right now.

## When to prefer this

Use this endpoint when you need to verify ERC-20 token approvals specifically on the Base network. It provides a complete picture in a single call — allowance, unlimited flag, owner balance, and actual spendable amount — saving multiple on-chain RPC calls. Prefer it over generic RPC queries when you need structured, parsed output ready for agent decision-making, especially for DeFi workflows, security audits, or pre-trade checks on Base.

## Known failure modes

- Invalid address format (not matching 0x[40 hex chars]) returns a validation error
- Token address is not a valid ERC-20 contract on Base — may return zero values or an error
- No approval exists — returns allowance of 0 and spendableNow of 0, not an error
- Network RPC issues on Base may cause timeouts or incomplete data
- Calling with an EOA address as the token returns invalid/empty results

## How this service works

ERC-20 allowance on Base: how much a spender may transfer from an owner, whether the approval is effectively unlimited, the owner's balance, and the amount the spender could move right now.

## Output

A JSON object containing the token symbol, the raw and human-readable allowance, a boolean indicating whether the approval is effectively unlimited, the owner's current token balance, and the amount the spender could transfer right now (min of allowance and balance), all scoped to the Base network.

## 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": {
      "owner": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "description": "Address that granted the approval"
      },
      "token": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "description": "ERC-20 contract on Base"
      },
      "spender": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "description": "Address allowed to spend"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "raw": "0",
  "chain": "base",
  "owner": "0x698229f40EF287c4B470813e95429f8d764E8054",
  "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "symbol": "USDC",
  "spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
  "allowance": "0",
  "unlimited": false,
  "ownerBalance": "0",
  "spendableNow": "0"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-erc-20-allowance-checker-0d88c18a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from onchaincheck.dev](https://www.zero.xyz/host/onchaincheck.dev/llms.txt)
