# OneSource Token Total Supply

> OneSource Token Total Supply is a paid API for AI agents from skills.onesource.io, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-15).

Returns the total supply of an ERC20 or ERC721 token contract by calling totalSupply on-chain via eth_call

## Facts

- Endpoint: GET https://skills.onesource.io/api/chain/total-supply
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/skills-onesource-io-a60a0039
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-NhjgXIKieYlZKTgKXd_E

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 skills-onesource-io-a60a0039
```

Example prompt: What's the total supply of the USDC token on Ethereum — the contract address is 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48?

## When to prefer this

Use this endpoint when you need on-chain totalSupply data for any ERC20 or ERC721 token on supported networks (Ethereum, Base, Avalanche, Sepolia, MegaETH). It also returns human-readable token metadata (name, symbol, decimals) in one call, making it ideal for DeFi analytics, NFT supply checks, or token research without running your own RPC node.

## Known failure modes

- Invalid contract address format returns a 400 error
- Contract address that doesn't implement totalSupply returns an error or null supply
- Unsupported network value causes validation failure
- Network RPC unavailability causes a timeout or 503
- Non-token contract address (e.g. wallet or proxy with no ERC20 interface) may return unexpected results

## How this service works

Total supply of an ERC20 or ERC721 token contract via totalSupply (eth_call)

## Output

Returns a JSON object with the token's name, symbol, decimals, total supply (as a raw integer string), whether it's an ERC721, and the contract address. For example, USDC on Ethereum returns name='USD Coin', symbol='USDC', decimals=6, total_supply='54863922761251119', is_erc721=false.

## Example request

```json
{
 "network": "ethereum",
 "contract": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "network": {
   "enum": [
    "ethereum",
    "sepolia",
    "avax",
    "megaeth",
    "megaeth-testnet",
    "base"
   ],
   "type": "string",
   "default": "ethereum"
  },
  "contract": {
   "type": "string",
   "pattern": "^0x[a-fA-F0-9]{40}$"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "data",
  "meta"
 ],
 "properties": {
  "data": {
   "type": "object",
   "required": [
    "name",
    "symbol",
    "decimals",
    "is_erc721",
    "total_supply",
    "contract_address"
   ],
   "properties": {
    "name": {
     "type": "string"
    },
    "symbol": {
     "type": "string"
    },
    "decimals": {
     "type": "number"
    },
    "is_erc721": {
     "type": "boolean"
    },
    "total_supply": {
     "type": "string"
    },
    "contract_address": {
     "type": "string"
    }
   }
  },
  "meta": {
   "type": "object",
   "required": [
    "endpoint",
    "request_id"
   ],
   "properties": {
    "endpoint": {
     "type": "string"
    },
    "request_id": {
     "type": "string"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/skills-onesource-io-a60a0039/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from skills.onesource.io](https://www.zero.xyz/host/skills.onesource.io/llms.txt)
