# BRAINIAC ERC-20 Total Supply Lookup

> BRAINIAC ERC-20 Total Supply Lookup is a paid API for AI agents from www.brainiac.software, paid per call via x402, $0.01/call, status unknown (last checked 2026-11-17).

Returns the total supply of an ERC-20 token at a specified block number on-chain

## Facts

- Endpoint: POST https://www.brainiac.software/api/v1/chain-data/token/erc20-total-supply?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-17
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brainiac-erc-20-total-supply-lookup-1f983b29
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_0hD3IZGM_rZMVLn9ecNIW

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 brainiac-erc-20-total-supply-lookup-1f983b29 -d '<json body>'
```

Example prompt: What was the total supply of the USDC token (contract 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) at block 19000000?

## When to prefer this

Use this endpoint when you need to look up the exact on-chain total supply of any ERC-20 token at a specific block height without setting up a full blockchain node or RPC subscription. It is ideal for point-in-time historical queries, DeFi analytics, token audits, and agent workflows that require verified on-chain supply data with pay-per-call economics and no account setup.

## Known failure modes

- Invalid or malformed token contract address (not matching ^0x[a-fA-F0-9]{40}$) returns a validation error
- Block number out of valid range or not yet mined returns an error
- Token address is not an ERC-20 contract (no totalSupply function) may return an error or empty result
- Network or RPC connectivity issues causing timeouts
- Payment failure via x402 results in HTTP 402 and no data returned

## How this service works

Pay-per-call APIs for AI agents: OFAC sanctions screening, compliance checks, token security, and Base chain data via x402. No account. Fixed USDC price. MCP-ready.

## Output

A JSON object containing the total supply of the specified ERC-20 token, expressed as a numeric value (typically in the token's smallest unit, e.g. wei for 18-decimal tokens), as recorded at the given block number on-chain.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "blockNumber": {
   "type": "integer",
   "maximum": 9007199254740991,
   "minimum": 0
  },
  "tokenAddress": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "source": {
   "url": "https://mainnet.base.org",
   "status": "OK"
  },
  "chainId": 8453,
  "blockNumber": "latest",
  "retrievedAt": "2026-11-07T12:08:59.834Z",
  "totalSupply": "0x000000000000000000000000000000000000000000000000000f2dbd176dc538",
  "tokenAddress": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
  "totalSupplyDecimal": "4272414815798584"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brainiac-erc-20-total-supply-lookup-1f983b29/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from www.brainiac.software](https://www.zero.xyz/host/www.brainiac.software/llms.txt)
