markets | R Documentation |
Get data frame with prices of cryptocurrencies using the REST API of cryptowat.ch.
markets(pair, params = NULL, exchange = "kraken", route = "ohlc", datetime = TRUE)
pair |
A string containing a pair symbol, e.g. btcusd (required argument). |
params |
A list containing |
exchange |
A character string containing the exchange. Default is kraken. |
route |
A character string containing the route. Default is ohlc. |
datetime |
A logical. |
A data frame containing OHLC candlestick prices of a given pair of currencies.
See https://docs.cryptowat.ch/rest-api for further information.
get_markets
, get_assets
, get_exchanges
,
get_pairs
## Not run: df_ohlc_hourly <- markets("btcusd") df_ohlc_hourly2 <- markets("btcusd", list(periods = 3600, before = 1609851600, after = 1609506000), datetime = FALSE) df_ohlc_daily <- markets("btceur", list(periods = 86400, before = "2021-05-12", after = "2021-01-01"), datetime = TRUE) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.