Pro and above · Compare plans and subscribe
Merge live candles with historical OHLCV
Build a one-minute OHLCV chart on Solana or Robinhood Chain that handles overlapping history, live updates and candle revisions.
Integration choice
Use a map keyed by chain, token and bucket start. Install the REST baseline, then apply buffered stream updates in arrival order. Replace a closed or revised bucket in place. Request interim updates only while a chart needs them.
Implementation steps
- Choose a traded token and set SOLANA_MINT or RHC_ADDRESS on your server. Run the matching request below to load the initial one-minute window.
- On the standard stream, subscribe to token:candles with filters.mints on Solana or rhc:token_candles with filters.addresses on Robinhood Chain. Subscribe before the history read and buffer live candles until the baseline is installed.
- Merge by chain, token and bucket start. Replace a bucket when its final or revised candle arrives. Enable updates only when the chart displays the unfinished minute. After incomplete replay, reload the affected historical interval.
Code examples
Solana
curl -H "Authorization: Bearer $MADEONSOL_API_KEY" "https://madeonsol.com/api/v1/tokens/$SOLANA_MINT/candles?tf=1m&limit=60"Robinhood Chain
curl -H "Authorization: Bearer $MADEONSOL_API_KEY" "https://madeonsol.com/api/v1/rhc/tokens/$RHC_ADDRESS/candles?tf=1m&limit=60"
Verify your integration
Let a minute close while the history request is in flight. The chart should show one row per bucket. On Robinhood Chain, applying a revision to an existing bucket should change that row without increasing the row count.
