# Base DeFi & Token Intelligence API — Full Agent Reference (v5.1) ## Overview A non-custodial, zero-API-key, sub-50ms edge-cached DeFi intelligence hub for autonomous AI agents on Base Mainnet (Chain ID: 8453). Supports HTTP 402 (x402 Base USDC micropayments), Remote MCP (POST /mcp), and A2A discovery (/.well-known/agent.json). ## Payment Specification (HTTP 402) - Network: Base Mainnet (chainId: 8453) - Token: USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, 6 decimals) - Recipient (payTo): 0x9c3d99eabe60cf9e5f8baf6409c6297fb361d337 - Header: X-PAYMENT-TX: <0x_base_tx_hash> - Replay Protection: Each tx hash is valid for 1 paid request (24h edge guard). ## Endpoints & Exact Pricing 1. GET /free/base-pulse ($0 - FREE) Returns live Base gas price and status. Ideal for health checks. 2. GET /api/base-gas ($0.001 USDC = 1000 micro-USDC) Returns gasPriceGwei and optimalPriorityGwei. 3. GET /api/wallet-balance?address=0x... ($0.001 USDC = 1000 micro-USDC) Returns live Base ETH and USDC balances. 4. GET /api/token-safety?address=0x... ($0.002 USDC = 2000 micro-USDC) Returns priceUsd, liquidityUsd, volume24hUsd, fdv, dex, and riskScore (LOW/MEDIUM/HIGH). 5. GET /api/dex-spread?address=0x... ($0.002 USDC = 2000 micro-USDC) Compares liquid Base DEX pools (> $5k liquidity) and returns buyOn, sellOn, and spreadPercent. 6. GET /api/trending-pools ($0.002 USDC = 2000 micro-USDC) Returns top 10 Base pools sorted by 24h volume (TVL > $500k). 7. GET /api/defi-yields ($0.003 USDC = 3000 micro-USDC) Returns top 10 safe Base DeFi pools (TVL > $1M, APY 1%-150%).