Batch token prices + trade price impact (Base and Solana DEX pools)
onchain_prices_batchUse when a trading agent needs many token prices at once plus what a buy would really cost. Input: tokens (≤25, base:0x… or sol:, ≤10 Solana), amount_usd (default 1000). Output: per token priceUsd, confidence, pool, depth and a buy estimate: tokensOut, effectivePriceUsd, priceImpactPct (Uniswap v3 QuoterV2 / Aerodrome on Base, CLMM estimate on Orca). Cached 20 s. Example: ?tokens=base:0x4200000000000000000000000000000000000006&amount_usd=5000 Price: $0.008 USDC (Base or Solana) via x402.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tokens | Yes | Comma-separated chain:address list, max 25 (≤10 Solana). Bad input → 400 before payment (not charged) | |
| amount_usd | No | Size of the buy to estimate, in USD (default 1000) |