Currency Exchange
Hello,
I would like to grab the historical and daily currency exchange and automate it for my workflow.
I found a FX_Currency workflow in Knime, however, I have been receiving the following error:
library(priceR)
data ← historicalexchangerates(knime.flow.in[[“FXFROM”]], to = knime.flow.in[[“FXTO”]], startdate = knime.flow.in[[“DATE”]], enddate = knime.flow.in[[“DATE”]])
data$date<-as.character(data$date)
knime.out<-data
Error: i In index: 1.
Caused by error in
append_exchangeratehost_access_key():
!
Exchangerate.host access key not found.
Please create one here: https://exchangerate.host/
Then set it in your R environment with
Sys.setenv(“EXCHANGERATEHOSTACCESSKEY”=“youraccesskey”)
E.g.
Sys.setenv(“EXCHANGERATEHOSTACCESSKEY”=“afty4m2dmpcs1uyp9coimr5vjr4y27t2”)
Error: object of type ‘closure’ is not subsettable
I did get an exchange key from the website and ran it in the R itself but it gave me the following error:
Error: object ‘exchangerate’ not found
How can I get this worked? is there any other way to get the historical and live exchange rate data?