# Base Wallet Portfolio Valuation (Live Onchain)

> Base Wallet Portfolio Valuation (Live Onchain) is a paid API for AI agents from x402-data-api.bodhinindustries.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Returns a live USD portfolio valuation for a Base wallet address, pricing each ERC-20 and native ETH holding directly from on-chain data with no third-party price feeds.

## Facts

- Endpoint: GET https://x402-data-api.bodhinindustries.workers.dev/portfolio
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-wallet-portfolio-valuation-live-onchain-c1dba8d8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fTMI7f0oqCnUPb74PgD2B

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-wallet-portfolio-valuation-live-onchain-c1dba8d8
```

Example prompt: What is the current total USD value of my Base wallet 0x4a7d3b6f... across all its ERC-20 tokens and ETH, priced live from on-chain — no third-party data?

## When to prefer this

Choose this endpoint when you need a live, self-computed USD valuation of a Base wallet with no reliance on third-party price oracles or data providers — ideal for scenarios requiring trustless, manipulation-resistant pricing sourced directly from Base chain state. Prefer this over Etherscan or CoinGecko-backed portfolio APIs when auditability and on-chain provenance of prices matter.

## Known failure modes

- Invalid or malformed wallet address returns an error or empty holdings
- Token addresses in the optional 'tokens' param that are not valid ERC-20s on Base may be skipped or return no_pool pricing source
- Tokens with no Uniswap pool on Base return priced:false and null priceUsd
- Network or RPC errors on the Base chain may cause computation failure
- Exceeding 10 extra token addresses in the 'tokens' param may result in truncation or error

## How this service works

Self-computed Base onchain toolkit for AI agents: ERC-20 safety scan, manipulation-resistant TWAP price oracle, gas/fee oracle, calldata decoder, token/address/contract intel, wallet approval-risk audit, and batch token triage — all computed live from raw Base chain, no third-party data.

## Output

A JSON object containing: the Base block height at time of computation, the wallet address, a list of all holdings with balance > 0 (each with token address, symbol, human-readable balance, USD price, USD value, and pricing source), the total USD value of priced holdings, a count of priced vs total holdings, the self-computed ETH/USD price, an ISO-8601 timestamp, and a flag confirming no third-party data was used.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "wallet"
 ],
 "properties": {
  "tokens": {
   "type": "string",
   "description": "Optional comma-separated extra Base ERC-20 addresses to include beyond the major-token set (up to 10)."
  },
  "wallet": {
   "type": "string",
   "description": "Base wallet address to value (EOA or contract)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "block": {
   "type": "integer",
   "description": "Base block height"
  },
  "wallet": {
   "type": "string",
   "description": "wallet valued"
  },
  "coverage": {
   "type": "string",
   "description": "what was covered"
  },
  "holdings": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "token": {
      "type": "string",
      "description": "token address or 'native'"
     },
     "priced": {
      "type": "boolean",
      "description": "was it priced"
     },
     "source": {
      "type": "string",
      "description": "quoter_v2 | stablecoin_ref | no_pool"
     },
     "symbol": {
      "type": "string",
      "description": "symbol"
     },
     "balance": {
      "type": "string",
      "description": "human balance"
     },
     "priceUsd": {
      "type": "number",
      "description": "USD per token (or null)"
     },
     "valueUsd": {
      "type": "number",
      "description": "USD value of this holding"
     }
    }
   }
  },
  "totalUsd": {
   "type": "number",
   "description": "total USD value (priced holdings)"
  },
  "computedAt": {
   "type": "string",
   "description": "ISO-8601 timestamp"
  },
  "ethPriceUsd": {
   "type": "number",
   "description": "self-computed ETH/USD (or null)"
  },
  "pricedCount": {
   "type": "integer",
   "description": "holdings that could be priced"
  },
  "holdingsCount": {
   "type": "integer",
   "description": "holdings with balance > 0"
  },
  "thirdPartyDataUsed": {
   "type": "boolean",
   "description": "always false"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-wallet-portfolio-valuation-live-onchain-c1dba8d8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-data-api.bodhinindustries.workers.dev](https://www.zero.xyz/host/x402-data-api.bodhinindustries.workers.dev/llms.txt)
