# Zenzen Onchain Reader x402 API for agents Pay-per-call read-only onchain utilities for AI agents: DEX token snapshot across chains, Base and Solana wallet balances, Base gas. USDC on Base via x402. Pay per call in USDC on Base via x402 v2. No account, no API key, no signup. Failed calls (HTTP 4xx/5xx) are not settled. ## How to call 1. Call the endpoint without payment. You get HTTP 402 with a PAYMENT-REQUIRED header (base64 JSON: price, asset, payTo, network eip155:8453). 2. Sign an EIP-3009 USDC authorization (the facilitator pays the gas, you need no ETH) and repeat the call with the PAYMENT-SIGNATURE header. Any x402 client does this automatically (@x402/fetch, @x402/axios, AgentKit, @x402/mcp). 3. HTTP 200 returns the data; the PAYMENT-RESPONSE header carries the settlement transaction. MCP (Streamable HTTP): https://api.zenzen.fun/mcp (tools are free to list; calls are paid). Discovery: https://api.zenzen.fun/.well-known/x402 OpenAPI: https://api.zenzen.fun/openapi.json Agent card: https://api.zenzen.fun/.well-known/agent-card.json payTo: 0x3a47581264273B29C14Bb67f76fA34EEF743149B ## Endpoints ### /v1/token/dex ($0.005 USDC) Market snapshot for any token address on any chain DexScreener covers (EVM or Solana): top 5 DEX pairs by liquidity with USD price, liquidity, 24h volume, price change (5m/1h/6h/24h), 24h transactions, FDV, market cap and pair age. Example: `GET https://api.zenzen.fun/v1/token/dex?address=So11111111111111111111111111111111111111112` ### /v1/base/balance ($0.002 USDC) ETH and USDC balances of an address on Base mainnet, read from a public RPC node. Returns raw and human units plus the latest block number. Example: `GET https://api.zenzen.fun/v1/base/balance?address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` ### /v1/solana/balance ($0.002 USDC) SOL and USDC balances of a Solana wallet address, read from public Solana RPC nodes. Returns lamports, SOL, and total USDC across the wallet's token accounts. Example: `GET https://api.zenzen.fun/v1/solana/balance?address=Vote111111111111111111111111111111111111111` ### /v1/base/gas ($0.001 USDC) Current gas conditions on Base mainnet: gas price and EIP-1559 base fee in gwei, plus latest block number and timestamp (raw gwei, no USD conversion). Example: `GET https://api.zenzen.fun/v1/base/gas?`