powered by
Get OHLCV Bars (short-term)
cb_bars(product_id, start_time, end_time, bar_size)
Get a data.frame with rates for a single product by product ID, grouped in buckets.
data.frame
returns OHLCV for cryptocurrencies
= The trading pair (e.g. 'BTC-USD').
= The UNIX timestamp indicating the start of the time interval.
= The UNIX timestamp indicating the end of the time interval.
= 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_bars(product_id = "ETH-USD", start_time = Sys.time()-hours(1), end_time = Sys.time(), bar_size = 'FIVE_MINUTE') }
Run the code above in your browser using DataLab