# Crypto Microdata – Wallet Portfolio (x402)

> Crypto Microdata – Wallet Portfolio (x402) is a paid API for AI agents from kr-x402-mvp.kgy5612.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-31).

Returns ETH balance, USDC balance, nonce, gas affordability, and x402 payment capability for a given Base wallet address, payable via USDC micropayment.

## Facts

- Endpoint: GET https://kr-x402-mvp.kgy5612.workers.dev/api/wallet-portfolio?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-31
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/crypto-microdata-wallet-portfolio-x402-e9241a49
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_iXtddu_ZRjQpHAHuHFDYU

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 crypto-microdata-wallet-portfolio-x402-e9241a49
```

Example prompt: Can you check the wallet 0xe4be4d0bd82d8e68203deff81f79ede0529f2617 on Base and tell me its ETH and USDC balances, whether it can pay gas, and if it's set up for x402 micropayments?

## When to prefer this

Use this endpoint when an AI agent on Base needs a lightweight, no-API-key pre-flight check of a wallet's ETH gas reserves, USDC holdings, nonce, and x402 payment readiness before executing onchain transactions or calling other pay-per-call microdata APIs. It is ideal for agentic loops that need to self-assess funding status cheaply ($0.003 USDC per call) without a traditional API subscription.

## Known failure modes

- Invalid wallet address format returns a validation error (must match ^0x[0-9a-fA-F]{40}$)
- Missing wallet query parameter returns a 400 bad request
- Insufficient USDC payment for x402 toll returns a 402 Payment Required before data is served
- Cloudflare Worker cold start may add minor latency
- Wallet with zero balances returns all zeros but no error

## How this service works

Pay-per-call crypto microdata for trading/onchain AI agents via x402 (USDC on Base): Base gas, token risk, balances, multi-venue prices, Hyperliquid book/funding, kimchi premium. No API keys.

## Output

A JSON object containing: the chain name ('base'), the queried wallet address, ETH balance (float), USDC balance (float), wallet nonce (integer), a boolean indicating whether the wallet can pay gas (can_pay_gas), a boolean indicating whether the wallet can pay x402 micropayments (can_pay_x402), and the estimated ETH cost of an ERC20 transfer (gas_cost_erc20_transfer_eth).

## 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": [
      "wallet"
     ],
     "properties": {
      "wallet": {
       "type": "string",
       "pattern": "^0x[0-9a-fA-F]{40}$",
       "examples": [
        "0xe4be4d0bd82d8e68203deff81f79ede0529f2617"
       ],
       "description": "Wallet"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "eth": 0,
  "usdc": 0.079,
  "chain": "base",
  "nonce": 0,
  "wallet": "0xe4be4d0bd82d8e68203deff81f79ede0529f2617",
  "can_pay_gas": false,
  "can_pay_x402": true,
  "gas_cost_erc20_transfer_eth": 4e-7
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/crypto-microdata-wallet-portfolio-x402-e9241a49/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from kr-x402-mvp.kgy5612.workers.dev](https://www.zero.xyz/host/kr-x402-mvp.kgy5612.workers.dev/llms.txt)
