Hi there,
First I want to mention the fact that I'm totally new to Rstudio and R language and to this forum. And, as you might see, English isn't my main language. I'm sorry about that and I will try to do my best.
So here's my problem, I want to get financial data from Alphavantage, through their API, with the package called "alphavantager".
To do this I went on their API Documentation and I did everything as instructed. So when I request like for example "Stocks Time Series", everything goes nice and smooth, but when I try to get Forex Exchange Rates, I always do get an error about "argument is not an atomic vector", and I ain't got no clue on how to solve this, since the concept of atomic vector is a bit "dark" for me and I'm still learning.
Here's the code and the error ( I tried to do a reprex but I also have an error when I try to do it )
> library(alphavantager)
> av_get(av_fun = "CURRENCY_EXCHANGE_RATE",
+ from_currency = "EUR",
+ to_currency = "USD",
+ interval = "5min",
+ outputsize= "compact",
+ datatype="CSV")
Error: list(`1. From_Currency Code` = "EUR", `2. From_Currency Name` = "Euro", `3. To_Currency Code` = "USD", `4. To_Currency Name` = "United States Dollar", `5. Exchange Rate` = "1.11570000", `6. Last Refreshed` = "2020-01-15 16:30:00", `7. Time Zone` = "UTC", `8. Bid Price` = "1.11570000", `9. Ask Price` = "1.11570000"). API parameters used: symbol=NULL, function=CURRENCY_EXCHANGE_RATE, from_currency=EUR, to_currency=USD, interval=5min, outputsize=compact, apikey=HIDDEN_FOR_YOUR_SAFETY
In addition: Warning message:
In stri_c(..., sep = sep, collapse = collapse, ignore_null = TRUE) :
argument is not an atomic vector; coercing
The CSV file I would get should look like this
And here's the API Documentation from Alphavantage
I hope that I made it clear
Cheers