prepare_list_prices: Prepare the list of coins for prices

View source: R/prepare_list_prices.R

prepare_list_pricesR Documentation

Prepare the list of coins for prices

Description

Prepare the list of coins for prices.

Usage

prepare_list_prices(
  coins,
  start.date,
  end.date = lubridate::now("UTC"),
  force = FALSE
)

Arguments

coins

Which coins to include in the list.

start.date

What date to start reporting prices for.

end.date

What date to end reporting prices for.

force

Whether to force recreating list.prices even though it already exists (e.g., if you added new coins or new dates).

Details

The crypto2::crypto_history API is at times a bit capricious. You might need to try a few times before it process correctly and without errors.

Value

A data frame, with the following columns: timestamp, id, slug, name, symbol, ref_cur, open, high, low, close, volume, market_cap, time_open, time_close, time_high, time_low, spot.rate2, currency, date2.

Examples

my.coins <- c("BTC", "ETH")
my.list.prices <- prepare_list_prices(coins = my.coins, start.date = "2023-01-01")
head(my.list.prices)

cryptoTax documentation built on March 7, 2023, 7:46 p.m.