candle holds OHLC buckets per launch at two intervals: 60 seconds and 3600 seconds. Every indexed trade updates both buckets it falls into, so the table is complete for the trades the indexer sees and has no rows for minutes without a trade.
Fields
The primary key
(launch, interval, openTime) is the only index; always filter on launch and interval and order by openTime.
Candle prices are the spot price after each trade (the curve’s
spotPrice() or the pool price from sqrtPriceX96), so a candle’s close equals launch.lastPriceQuote right after its last trade. Execution prices live on the trade rows.Examples
Candles for a chart, oldest first, from a start time:curl:
Charting notes
- Prices are
1e18fixed point in the launch currency. Divide by1e18before handing them to a chart, or multiply by1e18 / currency.lastRatefirst for a USD chart. - Gaps are real: there is no row for a bucket with no trade. Fill forward from the previous
closeif your chart library expects a continuous series. volumeis quote units, sovolume / 1e18is the bucket’s turnover in the launch currency.- Post-graduation candles only exist on chains that index pool swaps (the testnets). On Robinhood Chain the series ends at graduation.
- Timestamps are seconds. Lightweight Charts and most libraries take seconds directly; convert to milliseconds only if yours needs it.