public_candles {rgdax}R Documentation

Get bids and asks for provided currency-pair (products) by GDAX.

Description

This function is a public function and will fetch historic rates for provided currency pair (product_id). Rates are returned in grouped buckets based on requested granularity. A maximum of 300 records are returned. If the date range and granularity are not within the resultant volume set, it will be rejected by Coinbase Pro.

Usage

public_candles(
  product_id = "BTC-USD",
  start = NULL,
  end = NULL,
  granularity = NULL
)

Arguments

product_id

Optional character parameter. This is a case insensitive value of the product id for which the order book is desired. Default to 'LTC-USD'. For all valid product ids, refer to public_info.

start

Optional string parameter. Start time in ISO 8601. Format YYYY-MM-DD

end

Optional string parameter. End time in ISO 8601. Format YYYY-MM-DD

granularity

Optional parameter. Desired timeslice in seconds. The granularity field must be one of the following values: 60, 300, 900, 3600, 21600, 86400. Otherwise, the request will be rejected. These values correspond to timeslices representing one minute, five minutes, fifteen minutes, one hour, six hours, and one day, respectively.

Value

Dataframe with a time of the candle, low, high, open , close and volume for that candle.

Examples

## Not run: 
public_candles()
public_candles("ETH-EUR")
ublic_candles("ETH-EUR",start="2012-01-18", end="2012-01-25",granularity=3600)

## End(Not run)


[Package rgdax version 1.2.1 Index]