get_dex_price_candles
Retrieve ETH or BTC OHLCV price candles from on-chain Uniswap v3 DEX swaps on Base at 5m, 15m, 1h, 4h, or 1d intervals. Use it for DEX-based charting and analysis rather than oracle spot prices.
Instructions
chainpeek: Get ETH or BTC OHLCV price candles from on-chain DEX swaps. For the oracle price now use get_token_price. Returns OHLCV for WETH/USDC or cbBTC/USDC from Uniswap v3 swaps on Base, at 5m, 15m, 1h, 4h or 1d, with pool, fee and indexed block. DEX prices can differ from centralized exchanges. Empty candles carry the previous close. The last candle is forming unless closed_only is true: complete as indexed, no chain finality implied. Informational only, not investment advice. Bad input (422), warming_up and rpc_unavailable (503) are not charged. Typically under 0.1 s (served from an index kept current in the background). Price: USD 0.003. Free: 10 chain reads per IP per UTC day. Docs: https://tanod.dev/learn/crypto-ohlcv-candles-api.html
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": {
"pair": "<pair>"
},
"name": "get_dex_price_candles"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pair | Yes | WETH/USDC (ETH in USDC, Uniswap v3 0.3% pool on Base) or cbBTC/USDC (BTC in USDC, Uniswap v3 0.05% pool on Base). | |
| limit | No | Candles, newest last. Default 48 up to the cap: 5m/15m 200, 1h 168, 4h 42, 1d 30 (closed only: 29). | |
| interval | No | Candle length, UTC-aligned. | 1h |
| closed_only | No | Only intervals complete at the indexed block time. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dex | No | ||
| fee | No | ||
| base | No | ||
| note | No | ||
| pair | No | ||
| pool | No | ||
| as_of | No | ||
| chain | No | ||
| count | No | ||
| error | No | Only on an error result: an object {code, message}, or the reason string of an x402 PaymentRequired object. | |
| quote | No | ||
| source | No | ||
| candles | No | ||
| interval | No | ||
| as_of_iso | No | ||
| price_unit | No | ||
| timestamps | No | ||
| as_of_block | No | ||
| interval_seconds | No | ||
| last_candle_partial | No |