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 the price impact of a buy. Input: tokens (≤25, base:0x… or sol:, ≤10 Solana), amount_usd (default 1000) or amounts (up to 5 USD sizes). Output: per token priceUsd, confidence, pool, depth and buy estimates: tokensOut, effectivePriceUsd, priceImpactPct (Uniswap v3 QuoterV2 / Aerodrome, Orca CLMM). Use instead: onchain_prices for up to 10 tokens without impact; swap_quote for a specific swap. Example: ?tokens=base:0x4200000000000000000000000000000000000006&amounts=1000,100000 Price: $0.008 per call, paid in USDC (Base, Monad, Polygon, Arbitrum or Solana) via x402.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"tokens": "<tokens>"
},
"name": "onchain_prices_batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tokens | Yes | Comma-separated chain:address list, max 25 (≤10 Solana). Bad input → 400 before payment (not charged) | |
| amounts | No | Up to 5 USD buy sizes for a price-impact curve (instead of amount_usd); each price row gets trades[] | |
| amount_usd | No | Size of the buy to estimate, in USD (default 1000) |