get_dex_price
Fetch current Uniswap V3 spot prices on Base mainnet for trading pairs like ETH/USDC. Returns price, pool details, and token symbols with 30-second caching.
Instructions
Fetch the current spot price for a Uniswap V3 trading pair on Base mainnet. Reads sqrtPriceX96 from the pool contract's slot0() function and converts to a human-readable price. Returns price (token1 per token0), pool address, fee tier, token symbols, network, and cache status. Prices are cached for 30 seconds — the 'cached' field in the response indicates whether the result came from cache. Free tier — no payment required in standalone mode; $0.01 USDC via x402 on the resource server. Use list_trading_pairs first to discover available pairs and their token ordering.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pair | Yes | Trading pair identifier (e.g. 'ETH/USDC'). Use list_trading_pairs to see all available options with pool addresses and fee tiers. Each pair returns the price of token0 denominated in token1 (e.g. ETH/USDC returns USDC per 1 ETH, cbETH/WETH returns WETH per 1 cbETH). Available: ETH/USDC, ETH/USDT, WETH/DAI, USDC/USDbC, cbETH/WETH. |