r - Error while using rjson package to retrive Yahoo's API Stock data -
i'm trying spy prices yahoo real-time api, code used work in past error (below), how can overcome problem
library(rjson) json_file <- "http://finance.yahoo.com/webservice/v1/symbols/spy/quote?format=json&view=detail" json_data <- fromjson(paste(readlines(json_file), collapse="")) json_data
i error:
"error in file(con, "r") : cannot open connection in addition: warning message: in file(con, "r") : cannot open url 'http://finance.yahoo.com/webservice/v1/symbols/aa/quote?format=json&view=detail': http status '406 not acceptable'
you can use url alternative. downloads csv format can parsed easily. http://download.finance.yahoo.com/d/quotes.csv?s=goog+appl&f=nl1r
Comments
Post a Comment