For the functions that work on one coin at a time, so that a history of several coins gives a clear error instead of a wrong result.
Arguments
- history
Price history from
get_history().
Examples
history <- data.frame(name_symbol = c("Alpha (A)", "Beta (B)"))
try(crypto:::check_one_coin(history))
#> Error : history holds 2 coins, keep one of them first, for example history[history$name_symbol == "Alpha (A)", ]