portal_evm_get_ohlc
Build chart-ready OHLC candles and recent trade tape from Uniswap v2/v3/v4 and Aerodrome Slipstream swap events for EVM DEX 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. |