Get cryptocurrency prices aggregated through Tiingo

riingo_crypto_prices(
  ticker,
  start_date = NULL,
  end_date = NULL,
  resample_frequency = "1day",
  base_currency = NULL,
  exchanges = NULL,
  convert_currency = NULL,
  raw = FALSE
)

Arguments

ticker

One or more cryptocurrency tickers. Specified as "btcusd" for bitcoin quoted in USD. A character vector.

start_date

The first date to download data for. A character in the form YYYY-MM-DD, or a Date variable. The default is to download 1 year's worth of data.

end_date

The last date to download data for. A character in the form YYYY-MM-DD, or a Date variable.

resample_frequency

For Tiingo data, a character specified as one of: "daily", "weekly", "monthly" or "annually".

For IEX data, a character specified at the "min" or "hour" frequencies in the form: "1min", "5min", or "2hour".

For Crypto data, a character specified at the "min", "hour" or "day" frequencies similar to IEX.

base_currency

Instead of ticker you may pass a base currency. This selects all currencies with that base currency. For example if `base_currency="btc"`` tickers btcusd, btcjpy, btceur, etc.. will all be returned.

exchanges

If you would like to limit the query to a subset of exchanges, pass a comma-separated list of exchanges to select. Example) "POLONIEX, GDAX"

convert_currency

This parameter will convert the return data into another fx rate. For example if querying BTCUSD and convert_currency is 'cure', the bitcoin prices will be converted to CureCoin prices. Setting this to a value will add fxOpen, fxHigh, fxLow, fxClose, fxVolumeNotional, and fxRate accordingly. fxRate is the rate used to perform the currency calculation. If exchanges is specified, the conversion rate will be calculated using the exchanges passed.

raw

If TRUE, the raw underlying data from multiple exchanges will be returned, rather than the clean prices. This is the data that calculates the aggregated prices and quotes.

Examples

if (FALSE) { # Bitcoin prices riingo_crypto_prices("btcusd") # Bitcoin in USD and EUR riingo_crypto_prices(c("btcusd", "btceur"), start_date = "2018-01-01", resample_frequency = "5min") # Bitcoin raw data riingo_crypto_prices("btcusd", raw = TRUE) # Only use the POLONIEX exchange riingo_crypto_prices("btcusd", raw = TRUE, exchanges = "POLONIEX") # All btc___ crypotcurrency pairs riingo_crypto_prices(base_currency = "btc") }