W

Workers · Chain Token Balance

by Workers

GETBase

$0.001

per call · USD Coin on Base

ERC-20 token balance of a Base mainnet address, incl. symbol, decimals, balance_formatted.

Endpoint

GET https://x402-data-api.sigrunner.workers.dev/chain/token-balance

1

Calls / 30d

1

Unique payers / 30d

Aug 12

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://x402-data-api.sigrunner.workers.dev/chain/token-balance", {
  method: "GET",
});
const data = await res.json();
cURL
curl -X GET \
  "https://x402-data-api.sigrunner.workers.dev/chain/token-balance?address=0x4200000000000000000000000000000000000006&token=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "address": "0x4200000000000000000000000000000000000006",
  "balance_formatted": 1.05,
  "balance_raw": "1050000",
  "chain": "base",
  "decimals": 6,
  "symbol": "USDC",
  "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
}

Payment details

Pay to0x5765ae06a52dc7a0bb71c36a11db512c7ea9ed10
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

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

Get featured →

More from Workers & similar services