ERC-20 allowance (owner to · Token Allowance

by ERC-20 allowance (owner to

POSTBaseSolanaArbitrumPolygonMonadAvalancheeip155:1329OptimismFraxtaleip155:42220stellar:pubnetalgorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=

$0.002

per call · USD Coin on Base

How much of an ERC-20 token a spender contract is approved to move from an owner wallet - the approval check an agent runs before a swap, a bridge, or an x402 transferWithAuthorization flow. Returns the allowance as an exact decimal string scaled by the token's decimals, the raw uint256, and an `unlimited` flag for max-uint style approvals.

Endpoint

POST https://agent402.tools/api/token-allowance

3

Calls / 30d

1

Unique payers / 30d

Aug 31

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://agent402.tools/api/token-allowance", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "contract": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "network": "ethereum",
    "owner": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
    "spender": "0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD"
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://agent402.tools/api/token-allowance" \
  -H "Content-Type: application/json" \
  -d '{"contract":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","network":"ethereum","owner":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","spender":"0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD"}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "allowance": "0",
  "chainId": 1,
  "contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "decimals": 6,
  "fetchedAt": "2026-08-22T12:00:00.000Z",
  "network": "ethereum",
  "owner": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
  "raw": "0",
  "source": "alchemy",
  "spender": "0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
  "symbol": "USDC",
  "unlimited": false
}

Payment details

Pay to0xabf4fabd7c416fb67202e5f9002389fc75e2a9d0
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase, Solana, Arbitrum, Polygon, Monad, Avalanche, eip155:1329, Optimism, Fraxtal, eip155:42220, stellar:pubnet, algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=
Schemesexact, upto

Is this your API?

Pin it to the top of Onchain Data and the homepage with a featured placement.

Get featured →

More from ERC-20 allowance (owner to & similar services