I want take financial data using API. I do so.
#load jsons
library("rjson")
json_file <- "https://api.coindesk.com/v1/bpi/currentprice/USD.json"
json_data <- fromJSON(paste(readLines(json_file), collapse=""))
#get json content as data.frame
x = data.frame(json_data$time$updated,json_data$time$updatedISO,json_data$time$updateduk,json_data$bpi$USD)
x
But the main problem is that information changes every minute, so i can't gather history.
Are there ways to make R independently connect every minute(i.e. in real time mode) to this site and collect data every minute.
So collected data must be saved in C:/Myfolder
.
Is it possible to do it?