Learn R Programming

rCoinbase (version 1.0.0)

cb_candles: Get OHLCV Bars (long-term)

Description

Get OHLCV Bars (long-term)

Usage

cb_candles(product_id, start, end, bar_size)

Value

Get a data.frame with rates for a single product by product ID, grouped in buckets for more than 350 bars.

Arguments

product_id

= The trading pair (e.g. 'BTC-USD').

start

= start date to get data. Ex. Sys.Date()-60

end

= End date to get data. Ex. Sys.Date()

bar_size

= The timeframe each candle represents. Examples: ONE_MINUTE, FIVE_MINUTE, FIFTEEN_MINUTE, THIRTY_MINUTE, ONE_HOUR, TWO_HOUR, SIX_HOUR, ONE_DAY

Examples

Run this code
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