# OP Mainnet ERC-20 Allowance Checker

> OP Mainnet 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 allowance on OP Mainnet: how much a spender may transfer from an owner, whether it is unlimited, the owner's current balance, and the immediately spendable amount.

## Facts

- Endpoint: GET https://onchaincheck.dev/optimism/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/op-mainnet-erc-20-allowance-checker-98a135de
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2dipLqhGSG7YdEDkL8d1h

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 op-mainnet-erc-20-allowance-checker-98a135de
```

Example prompt: Check the USDC allowance on OP Mainnet for owner 0x9B1e7350517c2C94a990e55aC6c20De37675c703 and spender 0xFb4e4811C7A811E098A556bD79B64c20b479E431 — I want to know if the approval is unlimited, what the owner's balance is, and how much the spender can actually move right now.

## When to prefer this

Choose this endpoint when you specifically need ERC-20 allowance data on OP Mainnet (Optimism L2) — especially when you need the combined view of allowance, unlimited flag, owner balance, and immediately spendable amount in a single call. Prefer it over generic RPC calls when you want a human-readable, pre-processed answer without writing contract ABI logic. Use the Base equivalent for Base chain queries.

## Known failure modes

- Invalid Ethereum address format for token, owner, or spender returns a validation error
- Token address does not correspond to a valid ERC-20 contract on OP Mainnet may return zero or an error
- RPC or node connectivity issues may cause timeouts or 5xx errors
- Querying a non-existent approval returns allowance of 0 and spendableNow of 0

## How this service works

ERC-20 allowance on OP Mainnet: 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

Returns a JSON object containing the raw allowance value, human-readable allowance (e.g. '60'), whether the approval is effectively unlimited, the owner's current token balance, the amount the spender can move right now (min of allowance and balance), the token symbol, and the chain identifier ('optimism').

## 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 OP Mainnet"
      },
      "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": "60000000",
  "chain": "optimism",
  "owner": "0x9B1e7350517c2C94a990e55aC6c20De37675c703",
  "token": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
  "symbol": "USDC",
  "spender": "0xFb4e4811C7A811E098A556bD79B64c20b479E431",
  "allowance": "60",
  "unlimited": false,
  "ownerBalance": "66.148476",
  "spendableNow": "60"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/op-mainnet-erc-20-allowance-checker-98a135de/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)
