# Base Onchain Tools – Portfolio Balances

> Base Onchain Tools – Portfolio Balances is a paid API for AI agents from base-onchain-tools.dolerite.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-14).

Returns aggregated ETH and USDC balances across up to 20 Base mainnet addresses in a single call

## Facts

- Endpoint: GET https://base-onchain-tools.dolerite.workers.dev/v1/base/portfolio
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-onchain-tools-portfolio-balances-d5155fe5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5zfvlJSvzNpVQ3VdVeq9s

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-onchain-tools-portfolio-balances-d5155fe5
```

Example prompt: What are the combined ETH and USDC balances across these three Base mainnet addresses: 0xABC...123, 0xDEF...456, and 0x789...GHI?

## When to prefer this

Choose this endpoint when you need a quick, multi-address ETH and USDC balance rollup on Base mainnet without setting up RPC infrastructure or API keys. It's ideal for treasury dashboards, pre-payment checks, and portfolio monitoring across up to 20 addresses. The x402 pay-per-call model at $0.003 USDC makes it cost-effective for infrequent or bursty queries. Prefer alternatives if you need balances for tokens beyond ETH/USDC, need Ethereum mainnet or other chains, need historical balances, or require writes/transactions.

## Known failure modes

- Malformed or invalid Base addresses return a 4xx error (not billed)
- More than 20 addresses in the list causes a parameter validation error
- RPC failover exhausted across all five providers results in a 5xx (not billed)
- Partial data retrieval treated as full failure — no zero-padded partial responses returned
- Network timeout on Cloudflare Worker edge returns a 5xx error

## How this service works

Eleven read-only endpoints answering questions about Base mainnet that are tedious to assemble from raw RPC: what an unverified contract is actually able to do, whether a token transfer will revert and for what reason, what an arbitrary token is worth, and whether an address is safe to pay. Priced $0.001-$0.04 per call in USDC over x402. No account, no API key, no signup, no minimum, no rate limit to negotiate — the payTo address in the 402 response is the whole integration. Failed calls are not billed. The payment middleware cancels settlement on any 4xx or 5xx, so a malformed parameter or an upstream outage costs nothing. Answers are read live from Base mainnet at request time, with failover across five independent RPC providers. A batch that comes back incomplete is treated as a failure rather than returned with the missing entries as zeros, because a confident wrong answer costs a caller more than an error does. Scope is deliberately narrow: Base mainnet only, reads only, no keys held, nothing stored between requests.

## Output

A JSON object with the count of addresses queried, plus aggregated totals for ETH and USDC balances across all provided addresses (e.g. {"count": 2, "totals": {"eth": "0.5", "usdc": "1200.5"}}). Balances are read live from Base mainnet. If any address data is unavailable, the entire call fails rather than returning partial results with zeros.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "addresses"
     ],
     "properties": {
      "addresses": {
       "type": "string",
       "description": "Comma-separated Base addresses, max 20"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "count": 2,
  "totals": {
   "eth": "0.5",
   "usdc": "1200.5"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-onchain-tools-portfolio-balances-d5155fe5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from base-onchain-tools.dolerite.workers.dev](https://www.zero.xyz/host/base-onchain-tools.dolerite.workers.dev/llms.txt)
