# ERC20 Allowance Lookup (eth_call)

> ERC20 Allowance Lookup (eth_call) is a paid API for AI agents from api.onesource.io, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-13).

Returns how many tokens a spender is approved to transfer from an owner's wallet for a given ERC20 token contract on Ethereum or Sepolia.

## Facts

- Endpoint: GET https://api.onesource.io/api/chain/allowance
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/erc20-allowance-lookup-eth-call-f68943f7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JhX328HufragZjT-XiD8O

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 erc20-allowance-lookup-eth-call-f68943f7
```

Example prompt: How much USDC (0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) is the Uniswap v3 router (0xE592427A0AEce92De3Edee1F18E0157C05861564) approved to spend from my wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 on Ethereum mainnet?

## When to prefer this

Use this endpoint when you need to read the current ERC20 token allowance between a specific owner-spender pair on Ethereum mainnet or Sepolia testnet. Ideal for DeFi automation, pre-transaction approval checks, or auditing wallet approvals without needing to run your own Ethereum node. Prefer this over general-purpose RPC providers when you want a simple REST GET interface with x402 micropayment access.

## Known failure modes

- Invalid Ethereum address format for owner, spender, or token returns a 400 validation error
- Unsupported network value (anything other than 'ethereum' or 'sepolia') returns an error
- Token address is not a valid ERC20 contract (no allowance function) may return zero or an RPC error
- Network congestion or node unavailability may cause timeouts
- Missing required parameter (owner, spender, or token) returns a 422 or 400 error

## How this service works

ERC20 allowance via allowance (eth_call) - how much a spender is approved to move from an owner's wallet

## Output

The approved token allowance — i.e. the maximum number of token units the spender is permitted to transfer from the owner's address — returned as a numeric value in the token's base units (e.g. USDC uses 6 decimals).

## Example request

```json
{
 "owner": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
 "token": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
 "network": "ethereum",
 "spender": "0xE592427A0AEce92De3Edee1F18E0157C05861564"
}
```

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "contract",
      "owner",
      "spender"
     ],
     "properties": {
      "owner": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$"
      },
      "network": {
       "enum": [
        "ethereum",
        "sepolia",
        "robinhood"
       ],
       "type": "string",
       "default": "ethereum"
      },
      "spender": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$"
      },
      "contract": {
       "type": "string",
       "pattern": "^0x[a-fA-F0-9]{40}$"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "data",
      "meta"
     ],
     "properties": {
      "data": {
       "type": "object",
       "properties": {
        "name": {
         "type": "string"
        },
        "owner": {
         "type": "string"
        },
        "token": {
         "type": "string"
        },
        "symbol": {
         "type": "string"
        },
        "spender": {
         "type": "string"
        },
        "decimals": {
         "type": "integer"
        },
        "allowance": {
         "type": "string"
        }
       },
       "description": "Endpoint-specific response payload"
      },
      "meta": {
       "type": "object",
       "required": [
        "endpoint",
        "request_id"
       ],
       "properties": {
        "endpoint": {
         "type": "string"
        },
        "cost_usdc": {
         "type": "string"
        },
        "request_id": {
         "type": "string"
        },
        "payment_chain": {
         "type": "string"
        },
        "payment_token": {
         "type": "string"
        }
       }
      },
      "error": {
       "type": [
        "object",
        "null"
       ],
       "properties": {
        "code": {
         "type": "integer"
        },
        "message": {
         "type": "string"
 
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "name": "Tether USD",
   "owner": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
   "token": "0xdac17f958d2ee523a2206206994597c13d831ec7",
   "symbol": "USDT",
   "spender": "0x6b175474e89094c44da98b954eedeac495271d0f",
   "decimals": 6,
   "allowance": "115792089237316195423570985008687907853269984665640564039457584007913129639935"
  },
  "meta": {
   "endpoint": "/api/chain/allowance",
   "cost_usdc": "0.001",
   "request_id": "00000000abcdef01",
   "payment_chain": "base",
   "payment_token": "USDC"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/erc20-allowance-lookup-eth-call-f68943f7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.onesource.io](https://www.zero.xyz/host/api.onesource.io/llms.txt)
