Token prices from onchain DEX pools (Base and Solana), with pool, depth and confidence
onchain_pricesUse when an agent needs a token's USD price without a third-party price feed. Input: tokens (up to 10, base:0x… or sol:). Output: per token priceUsd, confidence, the pool used (Uniswap v3 / Aerodrome on Base, Orca Whirlpool on Solana; fee tier, depth in USD), path (direct USDC or via WETH/SOL), warnings; no price below $1,000 depth. Spot, not TWAP. Use instead: crypto_price for a major coin by ticker; onchain_prices_batch for many tokens plus buy impact; swap_quote for a specific swap. Example: ?tokens=base:0x940181a94A35A4569E4529A3CDfB74e38FD98631 Price: $0.003 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"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tokens | Yes | Comma-separated chain:address list, max 10 (base:0x… ERC-20, sol:<mint> base58), or tickers BTC, ETH, SOL, USDC, AERO, DEGEN, BONK, JUP. Bad input → 400 before payment (not charged) |