library(jsonlite)
## Warning: package 'jsonlite' was built under R version 4.4.3

2. Define the API URL

url <- "https://min-api.cryptocompare.com/data/v2/histoday?fsym=BTC&tsym=USD&limit=100"

3. Read the JSON data from the URL

raw_data <- fromJSON(url)

4. Extract the nested data

btc_history <- raw_data$Data$Data

5. Find the maximum of the daily close price

max_close_price <- max(btc_history$close, na.rm = TRUE)
print(max_close_price)
## [1] 96945.09