powered by
Get OHLCV Bars (long-term)
cb_candles(product_id, start, end, bar_size)
Get a data.frame with rates for a single product by product ID, grouped in buckets for more than 350 bars.
data.frame
= The trading pair (e.g. 'BTC-USD').
= start date to get data. Ex. Sys.Date()-60
= End date to get data. Ex. Sys.Date()
= The timeframe each candle represents. Examples: ONE_MINUTE, FIVE_MINUTE, FIFTEEN_MINUTE, THIRTY_MINUTE, ONE_HOUR, TWO_HOUR, SIX_HOUR, ONE_DAY
if (FALSE) { cb_candles(product_id="BTC-USD", start=Sys.Date()-30, end=Sys.Date(), bar_size= "FIFTEEN_MINUTE") }
Run the code above in your browser using DataLab