Chart token price history
portal_evm_get_ohlcGenerate chart-ready OHLC candles and recent trade tape from DEX swap events on EVM networks, supporting Uniswap v2/v3/v4 and Aerodrome Slipstream pools.
Instructions
Build chart-ready EVM OHLC candles plus a recent trade tape from supported DEX event sources, including Uniswap v2-style swaps, Uniswap v3/v4, and Aerodrome Slipstream.
COMMON USER ASKS:
Base Uniswap v2-style swap candles
Base Uniswap candles
Base Uniswap v4 candles
WHEN TO USE:
You need OHLC candles for supported EVM event-derived price sources.
You want a candle chart and recent trades instead of scalar time-series buckets.
You want a Dexscreener-style pool chart with hover-ready candle metadata and a trade tape.
DON'T USE:
You only need counts or scalar metrics over time.
You want a simple activity chart for a network rather than pool candles.
EXAMPLES:
Base Uniswap v2-style swap candles: {"network":"base-mainnet","source":"uniswap_v2_swap","pool_address":"0x","duration":"1h","interval":"5m","price_in":"auto","include_recent_trades":true}
Base Uniswap candles: {"network":"base-mainnet","source":"uniswap_v3_swap","pool_address":"0x","duration":"1h","interval":"5m","price_in":"auto"}
Base Uniswap v4 candles: {"network":"base-mainnet","source":"uniswap_v4_swap","pool_id":"0x","duration":"1h","interval":"5m","price_in":"auto","include_recent_trades":true}
Base Aerodrome Slipstream candles: {"network":"base-mainnet","source":"aerodrome_slipstream_swap","pool_address":"0x","duration":"1h","interval":"5m","price_in":"token1"}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fee | No | Optional Uniswap v4 LP fee in hundredths of a bip, e.g. 3000 for 0.30%. | |
| mode | No | Execution depth. Defaults to complete requested-window analysis; the optional fast value is only for explicitly bounded previews. | deep |
| cursor | No | Continuation cursor from a previous candle page | |
| source | No | Which event source to build candles from. Prefer swap-derived sources for factual trade prices and volumes. Uniswap v4 uses PoolManager Swap events filtered by pool_id, not a per-pool contract address. | uniswap_v3_swap |
| network | No | EVM network name (default: base-mainnet) | base-mainnet |
| pool_id | No | Uniswap v4 pool id (bytes32). Optional when you provide the full v4 pool key instead. | |
| duration | No | How much recent history to cover. Accepts compact durations like "1h" or natural phrases like "past 30 minutes". | 1h |
| interval | No | Candle interval. auto uses chart-friendly defaults like 1h→5m and 24h→1h. | auto |
| price_in | No | Choose which token the displayed price should be expressed in. auto picks the more human-readable quote side. | auto |
| base_token | No | Legacy orientation input. Prefer price_in instead. | |
| pool_address | No | Pool/pair contract address for address-keyed sources like Uniswap v3, Slipstream, or Sync-derived CPMM pools. | |
| tick_spacing | No | Optional Uniswap v4 tick spacing. Required with the rest of the pool key when deriving pool_id. | |
| hooks_address | No | Optional Uniswap v4 hooks contract address. Defaults to the zero address when omitted. | |
| token0_symbol | No | Optional token0 symbol label for summaries | |
| token1_symbol | No | Optional token1 symbol label for summaries | |
| token0_address | No | Optional token0 address to infer known decimals | |
| token1_address | No | Optional token1 address to infer known decimals | |
| token0_decimals | No | Optional token0 decimals for human-readable prices | |
| token1_decimals | No | Optional token1 decimals for human-readable prices | |
| currency0_address | No | Optional Uniswap v4 currency0 address. Use with currency1_address, fee, and tick_spacing to derive pool_id factually. | |
| currency1_address | No | Optional Uniswap v4 currency1 address. Use with currency0_address, fee, and tick_spacing to derive pool_id factually. | |
| recent_trades_limit | No | Maximum number of recent trades to return in the trade tape. | |
| pool_manager_address | No | Uniswap v4 PoolManager address. Optional on networks with a built-in official Uniswap deployment mapping. | |
| include_recent_trades | No | Include a recent trade tape for swap-derived sources when factual per-trade amounts are available. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| _ui | No | Optional chart, table, and follow-up presentation metadata. | |
| _llm | No | Hints that help an AI client locate the primary evidence. | |
| _meta | No | Network, block range, timing, and row-count metadata. | |
| error | No | Structured failure details when the tool cannot complete the request. | |
| items | No | Primary result rows when the tool returns a list. | |
| value | No | Primary result when the tool returns a scalar value. | |
| answer | No | Concise answer grounded in the returned blockchain data. | |
| _notice | No | Important limitation or truncation notice. | |
| display | No | Plain-language labels for presenting the result. | |
| _notices | No | Important limitations or truncation notices. | |
| _summary | No | Human-readable summary of the result. | |
| _coverage | No | Completeness of the requested window and result set. | |
| _evidence | No | Replayable arguments, exact-data digest, row count, and completeness receipt. | |
| _ordering | No | Ordering guarantees for the returned data. | |
| _execution | No | Bounded execution and scan details. | |
| _freshness | No | Freshness and finality information for the returned data. | |
| next_steps | No | Safe follow-up actions and continuation guidance. | |
| _pagination | No | Pagination state and an optional continuation cursor. | |
| investigation | No | Evidence paths, useful pivots, and result limitations. | |
| pipes_handoff | No | Optional SQD Pipes guidance for custom data needs. | |
| _tool_contract | No | Tool identity, intent, and supported blockchain families. |