# AgenticFi API > DeFi APIs for AI agents. 36 pay-per-call endpoints for token data, pricing, wallet analytics, swap routing, and on-chain workflows. Powered by x402 on Base. ## Overview AgenticFi API provides pay-per-call DeFi data endpoints for AI agents using the x402 micropayment protocol. All endpoints accept USDC payments on Base (EIP-155:8453). No API keys or subscriptions required — just pay and call. ## Discovery - OpenAPI spec: https://defi-api.agenticfi.wtf/openapi.json - x402 catalog: https://defi-api.agenticfi.wtf/.well-known/x402.json - MCP tools: https://defi-api.agenticfi.wtf/.well-known/mcp.json - Agent card: https://defi-api.agenticfi.wtf/.well-known/agent.json - Playground: https://defi-api.agenticfi.wtf/playground ## Endpoints - GET /api/token/price/:idOrSymbol: Real-time token price by CoinGecko ID or symbol - includes 24h change, volume, market cap [$0.001] - GET /api/token/price-history/:id: OHLCV candles for a token - supports 1d, 7d, 14d, 30d, 90d, 365d ranges [$0.001] - GET /api/token/info/:address: EVM token info by contract address or native asset - metadata, realtime price, supply fields, logo, and optional historical prices [$0.001] - GET /api/token/holders/:chainId/:address: ERC-20 token holders by chain - ranked by balance descending with first-acquired and transfer-initiation flags [$0.001] - GET /api/token/metadata/:id: Token metadata - name, symbol, decimals, logo, chains, links [$0.001] - GET /api/token/trending: Top trending tokens by search volume and social activity [$0.001] - GET /api/token/supply/:id: Circulating, total, max supply + FDV for a token [$0.001] - GET /api/token/pairs/:id: All DEX pairs for a token with liquidity data [$0.001] - GET /api/defi/protocol-tvl: TVL by protocol - top 50 or specific protocol with chain breakdown [$0.001] - GET /api/defi/yields: Top yield pools across all protocols and chains - sorted by APY [$0.001] - GET /api/defi/pool-details/:poolId: Detailed pool info - APY history, TVL, IL risk, reward tokens [$0.001] - GET /api/defi/lending-rates: Supply & borrow rates across Aave, Compound, Morpho, Spark [$0.001] - GET /api/defi/stablecoin-stats: Stablecoin market caps, peg deviations, circulating supply by chain [$0.001] - GET /api/defi/dex-volume: 24h DEX trading volume by chain and protocol [$0.001] - GET /api/defi/protocol-fees: Revenue and fees by protocol - daily fees and protocol revenue [$0.001] - GET /api/wallet/balances/:address: EVM token balances for a wallet - native + ERC-20 with Sim pricing, warnings, pagination, and optional historical prices [$0.001] - GET /api/wallet/activity/:address: EVM wallet activity feed - newest-first transfers, swaps, approvals, NFT movements, and decoded contract calls [$0.001] - GET /api/wallet/transactions/:address: EVM transactions for a wallet - raw transaction fields, gas data, pagination, and optional decoded calldata and logs [$0.001] - GET /api/wallet/history/:address: Transaction history - decoded actions with method labels [$0.001] - GET /api/wallet/collectibles/:address: EVM collectibles for a wallet - ERC-721 and ERC-1155 holdings with spam filtering, pagination, and optional spam score explanations [$0.001] - GET /api/wallet/nfts/:address: NFTs held by a wallet - collection, floor price, metadata [$0.001] - GET /api/wallet/defi-positions/:address: Active DeFi positions - lending, LP, staking across protocols [$0.001] - GET /api/swap/quote: Best swap route + price across DEX aggregators via LI.FI [$0.001] - GET /api/bridge/quote: Cross-chain bridge quote - route, fee, ETA via LI.FI [$0.001] - GET /api/gas/prices: Gas prices across EVM chains - fast, standard, slow in gwei [$0.001] - GET /api/gas/estimate: Gas estimate for a transaction type - transfer, swap, bridge, mint, etc. [$0.001] - GET /api/swap/slippage-check: Simulated swap to detect MEV/sandwich risk and actual slippage [$0.001] - GET /api/bridge/status: Track a bridge transaction - pending, confirmed, complete [$0.001] - GET /api/analytics/chain-stats: Chain-level stats - TVL, active chains, token symbols [$0.001] - GET /api/chain/supported: List all supported chains with RPCs, explorers, native tokens [$0.001] - GET /api/chain/token-list/:chainId: Canonical token addresses and metadata per chain [$0.001] - GET /api/chain/block-height/:chain: Latest block number for a chain [$0.001] - GET /api/social/token-mentions/:symbol: Social volume - Twitter/Farcaster mention count for a token [$0.001] - GET /api/social/sentiment/:symbol: Bullish/bearish sentiment score per token [$0.001] - GET /api/agent/portfolio-rebalance/:address: Suggested portfolio rebalance based on current holdings + yield opportunities [$0.001] - GET /api/agent/tx-summary/:txHash: Lightweight transaction summary from raw RPC data - action label, counterparties, status, gas, and log count [$0.001] ## Payment All endpoints require x402 payment. Send a request, receive a 402 challenge with payment requirements, sign a USDC transfer on Base, and resend with the payment header. The x402 client SDK handles this automatically. ## Pricing 36 endpoints at a flat $0.001 per call, paid in USDC on Base.