# Base Token Metadata

> Base Token Metadata is a paid API for AI agents from api.zfinia.com, paid per call via x402, $0.006/call, status unknown (last checked 2026-10-10).

Fetches the name, symbol, decimals, and total supply of an ERC-20 token contract on Base in a single call, handling edge cases like bytes32-encoded fields.

## Facts

- Endpoint: POST https://api.zfinia.com/x402/v1/base-token-metadata?utm_source=zero.xyz
- Price: $0.006/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-token-metadata-fe030bae
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_V10fuhe237wM2cR9YX0sY

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 base-token-metadata-fe030bae -d '<json body>'
```

Example prompt: Can you look up the token name, symbol, decimals, and total supply for the Base contract at 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913?

## When to prefer this

Choose this endpoint when you need ERC-20 token metadata from the Base network and want a single call that handles both standard string and bytes32-encoded name/symbol fields without writing custom decoding logic. Prefer it over direct RPC calls when you need graceful null handling for missing fields rather than a revert or decoder crash.

## Known failure modes

- Address is a wallet or has no deployed contract — returns a refusal error
- Contract exists but is non-standard and returns no readable metadata — affected fields come back null
- Malformed address (not a valid 0x hex string) — rejected by input schema validation
- Network congestion on Base causing timeout
- bytes32-encoded name/symbol decoded correctly but other edge cases may yield unexpected strings

## How this service works

Read a Base token name, symbol, decimals and total supply in one call. Handles tokens that return a bytes32 name or symbol instead of a string, which is the case that breaks naive decoders. Fields the contract does not implement come back null and are listed, rather than guessed at. Refuses an address with no contract.

## Output

Returns an object with token name, symbol, decimals, and total supply as read directly from the contract. Fields the contract does not implement are returned as null with those field names listed explicitly. If no contract exists at the given address, the call is refused with an error.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "token": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]{40}$"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-token-metadata-fe030bae/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.zfinia.com](https://www.zero.xyz/host/api.zfinia.com/llms.txt)
