You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is weird. This code should return a simple quote on the current rate of Bitcoin: av_get(symbol = NULL, av_fun = "CURRENCY_EXCHANGE_RATE", from_currency = "BTC", to_currency = "USD")
The API request is received without trouble and the data gets pulled as a json, instead of returning or converting to data frame, this code is executed
After determining the content isn't "Meta Data", the function decides to throw away the data as an error. Why? The data is already there, might as well return it as a list instead.
The text was updated successfully, but these errors were encountered:
After referencing the code in this repository (as opposed to debugging in RStudio), I see now that if (content_list[1] %>% names() != "Meta Data") then this is considered a "bad call". Maybe I misunderstand what that means, but in the case above I know the data was in fact retrieved via the API.
should not be there as this messed up my columns when I loaded it in locally. Also, do remove a curly bracket at the end of the code in order get closure.
I made a function like this to load a json file called "USDJPY.json"
scraping_cur <- function(x){
a <- jsonlite::fromJSON(paste0(x,".json"))
a <- lapply(a,unlist)
a <- do.call(rbind, a[-1])
a <- as.xts(a)
return(a)
}
EDIT: made a mistake, updated my comments
This is weird. This code should return a simple quote on the current rate of Bitcoin:
av_get(symbol = NULL, av_fun = "CURRENCY_EXCHANGE_RATE", from_currency = "BTC", to_currency = "USD")
The API request is received without trouble and the data gets pulled as a json, instead of returning or converting to data frame, this code is executed
After determining the content isn't "Meta Data", the function decides to throw away the data as an error. Why? The data is already there, might as well return it as a list instead.
The text was updated successfully, but these errors were encountered: