# 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.

Access: Pro and above

[Compare plans and subscribe](https://madeonsol.com/pricing#pricing)

## 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

1. 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.
2. 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.
3. 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.

## Solana

~~~bash
curl -H "Authorization: Bearer $MADEONSOL_API_KEY" "https://madeonsol.com/api/v1/tokens/$SOLANA_MINT/candles?tf=1m&limit=60"
~~~

## Robinhood Chain

~~~bash
curl -H "Authorization: Bearer $MADEONSOL_API_KEY" "https://madeonsol.com/api/v1/rhc/tokens/$RHC_ADDRESS/candles?tf=1m&limit=60"
~~~

![DEET one-minute USD candles with volume bars, the latest close time and the live candle legend.](https://madeonsol.com/guides/one-minute-candles.jpg)

The right edge shows the latest minute. The legend marks open or awaiting-confirmation candles with a faded style. Replace that bucket in place when its confirmed close arrives.

## 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.

## Related reference

- [Stream subscription builder](https://madeonsol.com/api-docs#stream-config)
- [Robinhood Chain reference](https://madeonsol.com/api-docs#rhc)

[Canonical guide](https://madeonsol.com/docs/candles)
