Description Usage Arguments Value Examples
Fetch OHLC and volume timeseries data for a specific market. The caller must specify a date range interval and datafrequency for the requested timeseries.
1 2 3 4 | ## S4 method for signature 'PoloniexPublicAPI'
ReturnChartData(theObject, pair = "USDT_BTC",
from = as.POSIXct("2014-01-01 00:00:00 UTC"),
to = as.POSIXct("2018-01-01 00:00:00 UTC"), period = "4H")
|
theObject |
The object on which the function should be called. |
pair |
a length-one character vector - The currencypair for which timeseries information should be fetched. |
from |
POSIXct - Starting timestamp for daterange interval. |
to |
POSIXct - Ending timestamp for daterange interval. |
period |
length-one character vector OR length-one numeric vector - datafrequency for requested timeseries. if is(period, "numeric"): 300 / 900 / 1800 / 7200 / 14400 / 86400 if is(period, "character"): "5M", "15M", "30M", "2H", "4H", "D" |
an xts timeseries object. rows - ohcl and volume information for one timestamp. columns - high, low, open, close, volume, quotevolume, weightedaverage.
1 2 3 4 5 6 7 8 9 10 11 12 | Sys.setenv(tz = "UTC")
poloniex.public <- PoloniexPublicAPI()
pair <- "BTC_NXT"
from <- as.POSIXct("2010-01-01 00:00:00 UTC")
to <- as.POSIXct("2012-04-09 00:00:00 UTC")
period <- "4H"
chart.data <- ReturnChartData(theObject = poloniex.public,
pair = pair,
from = from,
to = to,
period = period)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.