blockwatch.series: Retrieves Data from a Blockwatch Time Series endpoint

Description Usage Arguments Details Value References See Also Examples

View source: R/Blockwatchseries.R

Description

Retrieves Data from a Blockwatch Time Series endpoint

Usage

1
2
3
4
5
6
blockwatch.series(code, datatype = c("raw", "ts", "zoo", "xts",
  "timeSeries"), transform = c("", "diff", "rdiff", "normalize", "cumul",
  "rdiff_from"), collapse = c("", "1m", "5m", "15m", "30m", "1h", "3h",
  "6h", "12h", "1d", "1w", "1M", "3M", "1y", "daily", "weekly", "monthly",
  "quarterly", "annual"), order = c("asc", "desc"),
  force_irregular = FALSE, ...)

Arguments

code

Dataset code on Blockwatch specified as a string or an array of strings.

datatype

Type of data returned specified as string. Can be 'raw', 'ts', 'zoo', 'xts' or 'timeSeries'.

transform

Apply Blockwatch API data transformations.

collapse

Collapse frequency of Data.

order

Select if data is given to R in ascending or descending formats. Helpful for the rows parameter.

force_irregular

When set to TRUE, forces the index of the Data to be of date format yyyy-mm-dd

...

Additional named values that are interpreted as Blockwatch API parameters. Please see https:/blockwatch.cc/docs/api#database-metadata-api for a full list of parameters.

Details

Set your api_key with blockwatch.api_key function. For instructions on finding your api key go to https:/blockwatch.cc/account/profile#apikey.

Value

Depending on the type the class is either data.frame, time series, xts, zoo or timeSeries.

References

This R package uses the Blockwatch API. For more information go to https:/blockwatch.cc/docs/api. For more help on the package itself go to https:/blockwatch.cc/docs/r.

See Also

blockwatch.api_key

Examples

1
2
3
4
5
## Not run: 
data = blockwatch.series("BITFINEX:OHLCV/BTC_USD", start_date="2018-01-01", datatype="ts")
plot(data[,1])

## End(Not run)

blockwatch-cc/blockwatch-r documentation built on May 13, 2020, 4:06 p.m.