chainpeek: ETH and BTC OHLCV price candles from on-chain DEX swaps
get_dex_price_candlesFetch ETH or BTC OHLCV price candles in USDC from on-chain DEX swaps to chart and analyze price movements across multiple intervals.
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 candles for ETH (WETH/USDC) or BTC (cbBTC/USDC) in USDC from public Uniswap v3 swaps on Base, at 5m, 15m, 1h, 4h or 1d, with the pool, fee tier and the block the data is current to (about a minute behind). Computed by Tanod from one allow-listed pool per pair, not an exchange feed: DEX prices can differ from centralized exchanges; a candle without swaps repeats the previous close; the last candle is still forming. Informational only, not investment advice. A bad pair, interval or limit is a 422 before any payment; a 503 warming_up (index still loading) or rpc_unavailable is 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
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 | Number of candles, newest last. Default 48 (1d: 30). Lookback caps: 5m and 15m 200, 1h 168, 4h 42, 1d 30. | |
| interval | No | Candle length, UTC-aligned. | 1h |
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 |