Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getSymbols.yahoo does not follow redirect to HTTPS #149

Closed
SamoPP opened this issue Apr 18, 2017 · 38 comments
Closed

getSymbols.yahoo does not follow redirect to HTTPS #149

SamoPP opened this issue Apr 18, 2017 · 38 comments
Labels
Milestone

Comments

@SamoPP
Copy link

SamoPP commented Apr 18, 2017

It might be that Yahoo again changed something since today download is not working for me any more... I have tried the below many times on many different symbols but no luck...

> getSymbols("SPY", src="yahoo", from="2017-04-14", to="2017-04-18")
Error in download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m,  : 
  cannot open URL 'http://ichart.finance.yahoo.com/table.csv?s=SPY&a=3&b=14&c=2017&d=3&e=18&f=2017&g=d&q=q&y=0&z=SPY&x=.csv'
> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS

locale:
 [1] LC_CTYPE=en_US.UTF-8          LC_NUMERIC=C                 
 [3] LC_TIME=en_US.UTF-8           LC_COLLATE=en_US.UTF-8       
 [5] LC_MONETARY=en_US.UTF-8       LC_MESSAGES=en_US.UTF-8      
 [7] LC_PAPER=en_US.UTF-8          LC_NAME=en_US.UTF-8          
 [9] LC_ADDRESS=en_US.UTF-8        LC_TELEPHONE=en_US.UTF-8     
[11] LC_MEASUREMENT=en_US.UTF-8    LC_IDENTIFICATION=en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] quantmod_0.4-7 TTR_0.23-1     xts_0.10-0     zoo_1.7-13     rj_2.0.5-2    

loaded via a namespace (and not attached):
[1] tools_3.3.1     grid_3.3.1      lattice_0.20-34
@my-R-help
Copy link

my-R-help commented Apr 18, 2017

I can confirm this problem.

@actuariat
Copy link

actuariat commented Apr 18, 2017

Same problem. It seams that yahoo changed this.

@joshuaulrich
Copy link
Owner

This appears to be caused by a redirection from HTTP to HTTPS. I'm running R-3.3.3 with libcurl capabilities, so this still works, but with a warning.

R> getSymbols("SPY", verbose = TRUE)
downloading  SPY .....

trying URL 'http://ichart.finance.yahoo.com/table.csv?s=SPY&a=0&b=01&c=2007&d=3&e=18&f=2017&g=d&q=q&y=0&z=SPY&x=.csv'
Warning in download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m,  :
  "internal" method cannot handle https redirection to: 'https://ichart.finance.yahoo.com/table.csv?s=SPY&a=0&b=01&c=2007&d=3&e=18&f=2017&g=d&q=q&y=0&z=SPY&x=.csv'
switching to method = "libcurl" because of redirection to https
trying URL 'http://ichart.finance.yahoo.com/table.csv?s=SPY&a=0&b=01&c=2007&d=3&e=18&f=2017&g=d&q=q&y=0&z=SPY&x=.csv'
downloaded 187 KB

done.
[1] "SPY"
R> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] quantmod_0.4-7 TTR_0.23-1     xts_0.9-7      zoo_1.7-13    

loaded via a namespace (and not attached):
[1] grid_3.3.3      lattice_0.20-34
R> capabilities('libcurl')
libcurl 
   TRUE 

@SamoPP
Copy link
Author

SamoPP commented Apr 18, 2017

Well, I have libcurl so it looks something else is wrong:

> capabilities('libcurl')
libcurl 
   TRUE 
> getSymbols("SPY", verbose=TRUE)
downloading  SPY .....

trying URL 'http://ichart.finance.yahoo.com/table.csv?s=SPY&a=0&b=01&c=2007&d=3&e=18&f=2017&g=d&q=q&y=0&z=SPY&x=.csv'
Error in download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m,  : 
  cannot open URL 'http://ichart.finance.yahoo.com/table.csv?s=SPY&a=0&b=01&c=2007&d=3&e=18&f=2017&g=d&q=q&y=0&z=SPY&x=.csv'

@joshuaulrich
Copy link
Owner

@SamoPP But you're using an older version of R (3.3.1). That version might not automatically attempt to switch to libcurl in order to follow a redirect.

@SamoPP
Copy link
Author

SamoPP commented Apr 18, 2017

Well, what is funny is this...

If I run the above in terminal I get the error. If I run the above in StatET in Eclipse I get the error. If I run the same thing in RStudio it works...

I hate changing R versions since doing that every now and then breaks a whole lot of things...

@actuariat
Copy link

I'm using R 3.3.2 it won't work in R, but it works in RStudio.

@zerodf
Copy link

zerodf commented Apr 18, 2017

Confirmed that this issue affects R 3.3.1. It works from RStudio, but fails when run from RScript.

joshuaulrich added a commit that referenced this issue Apr 18, 2017
Yahoo Finance is now redirecting HTTP requests to HTTPS. Some users' R
installations are not able to follow this redirect, so they error.

Use HTTPS directly for Yahoo Finance and Yahoo Finance Japan.

Fixes #149.
@joshuaulrich
Copy link
Owner

Just pushed a patch to branch 149_yahoo_https. Works for me on Ubuntu. Would be great to have confirmation it works on Windows and MacOS.

@SamoPP
Copy link
Author

SamoPP commented Apr 18, 2017

Looks good for getSymbols(). Thanks Now just adjustOHLC() is not wrking... :)

$ R
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(quantmod)
Loading required package: xts
Loading required package: zoo

Attaching package:zooThe following objects are masked frompackage:base:

    as.Date, as.Date.numeric

Loading required package: TTR
Version 0.4-0 included new data defaults. See ?getSymbols.
> getSymbols("SPY")
    As of 0.4-0, ‘getSymbolsuses env=parent.frame() and
 auto.assign=TRUE by default.

 This  behavior  will be  phased out in 0.5-0  when the call  will
 default to use auto.assign=FALSE. getOption("getSymbols.env") and 
 getOptions("getSymbols.auto.assign") are now checked for alternate defaults

 This message is shown once per session and may be disabled by setting 
 options("getSymbols.warning4.0"=FALSE). See ?getSymbols for more details.
[1] "SPY"
> SPY <- adjustOHLC(SPY)
Error in download.file(paste(yahoo.URL, Symbol.name, "&a=", from.m, "&b=",  : 
  cannot open URL 'http://ichart.finance.yahoo.com/table.csv?s=SPY&a=0&b=01&c=1900&d=3&e=18&f=2017&g=v&ignore=.csv'
> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] quantmod_0.4-7 TTR_0.23-1     xts_0.10-0     zoo_1.8-0     

loaded via a namespace (and not attached):
[1] grid_3.3.1      lattice_0.20-34

@rmicalet
Copy link

rmicalet commented Apr 18, 2017

Doesn't quite seem to work for Windows (but I'm not an R guru so I could easily be mistaken). I'm running R 3.1.2.

I tried the following code:

symbol 		<- "SPY"
from		<- "2016-04-17"
to			<- "2017-04-17"
yahoo.URL 	<- "https://ichart.finance.yahoo.com/table.csv?"
from.y 		<- as.numeric(strsplit(as.character(as.Date(from, origin = "1970-01-01")), "-", )[[1]][1])
from.m 		<- as.numeric(strsplit(as.character(as.Date(from, origin = "1970-01-01")), "-", )[[1]][2]) - 1
from.d 		<- as.numeric(strsplit(as.character(as.Date(from, origin = "1970-01-01")), "-", )[[1]][3])
to.y 		        <- as.numeric(strsplit(as.character(as.Date(to,   origin = "1970-01-01")), "-", )[[1]][1])
to.m 		<- as.numeric(strsplit(as.character(as.Date(to,   origin = "1970-01-01")), "-", )[[1]][2]) - 1
to.d 		        <- as.numeric(strsplit(as.character(as.Date(to,   origin = "1970-01-01")), "-", )[[1]][3])
verbose		<- TRUE
tmp 		<- tempfile()

download.file(paste(yahoo.URL, "s=", symbol, "&a=", from.m, "&b=", sprintf("%.2d", from.d), "&c=", from.y, "&d=", to.m, "&e=", sprintf("%.2d", to.d), "&f=", to.y, "&g=d&q=q&y=0", "&z=", symbol, "&x=.csv", sep = ""), destfile = tmp, quiet = !verbose)

fr 			<- read.csv(tmp)
unlink(tmp)

And got the following error:
"Error in download.file(paste(yahoo.URL, "s=", symbol, "&a=", from.m, "&b=", :
unsupported URL scheme"

That was the same code that had worked prior to yesterday with the exception of the change in the yahoo url.

Best regards.

@joshuaulrich
Copy link
Owner

joshuaulrich commented Apr 18, 2017

@SamoPP Good catch. That's getSplits() and getDividends(). getQuote(), getFinancials(), getOptionsChain(), etc are likely affected also. Will grep for all HTTP calls and patch them.

@rmicalet R-3.1.2 is 2.5 years old and HTTPS wasn't supported and used as a default on all platforms until R-3.3.0. So that's the likely cause of your issue, not the code in getSymbols().

@rmicalet
Copy link

Ok, updated to R 3.3.3 and everything seems to work. Thank you!

@SamoPP
Copy link
Author

SamoPP commented Apr 18, 2017

Just pulled 149_yahoo_https branch, built it and tested on ubuntu. Works for me now. Thank you!

@actuariat
Copy link

actuariat commented Apr 20, 2017

I still have Problems in R 3.1.1 (I know it's old but it's the only version that runs in raspberry pi) with the new version quantmod 0.4-8.

Error in download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, :
unsupported URL scheme

@joshuaulrich
Copy link
Owner

@actuariat As I said earlier, HTTPS wasn't supported and used as a default on all platforms until R-3.3.0.

I just pushed a branch (your username) that replaces download.file with quantmod::try.download.file, which uses the downloader package to attempt to work-around HTTPS issues. I used that to patch getSymbols.FRED in July-2015 (R-3.3.0 was released in May-2016). Give that a shot and see if it works for you.

Note to self: quantmod::try.download.file might be helpful in a solution for #135.

@my-R-help
Copy link

my-R-help commented Apr 22, 2017

I see this bug has been closed (and getSymbols.yahoo works for me now), but I just want to report that adjustOHLC still doesn't work.

@joshuaulrich
Copy link
Owner

@my-R-help It works for me and others, so you need to provide more information than "still doesn't work" in order to help me debug. At minimum, please provide the error and the output from sessionInfo().

@my-R-help
Copy link

Interesting, I just realized that it works like this:

x <- getSymbols('^GSPC', auto.assign = F)
adjustOHLC(x)

But it does NOT work like this:

> adjustOHLC(getSymbols('^GSPC', auto.assign = F))
Error in download.file(paste(yahoo.URL, Symbol.name, "&a=", from.m, "&b=",  : 
  cannot download all files
In addition: Warning message:
In download.file(paste(yahoo.URL, Symbol.name, "&a=", from.m, "&b=",  :
  URL 'https://ichart.finance.yahoo.com/table.csv?s=getSymbols("^GSPC", auto.assign = F)&a=0&b=01&c=1900&d=3&e=22&f=2017&g=v&ignore=.csv': status was '400 Bad Request'

> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Fedora 23 (Workstation Edition)

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8       
 [4] LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                  LC_ADDRESS=C              
[10] LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] quantmod_0.4-8 TTR_0.23-1     xts_0.9-7      zoo_1.8-0      colorout_1.1-1

loaded via a namespace (and not attached):
[1] grid_3.3.1      lattice_0.20-33

@joshuaulrich
Copy link
Owner

adjustOHLC() attempts to infer the symbol.name (i.e. the ticker symbol) from the name of the first argument passed to it. In your second example, that name is getSymbols("^GSPC", auto.assign=F), which is not a valid ticker symbol. If you really want to call adjustOHLC() like that, you need to specify symbol.name = "^GSPC".

Or you can just use getSymbols("^GSPC", adjust = TRUE).

@my-R-help
Copy link

Great, that makes total sense. Many thanks for all your great work on quantmod!

@justaddcoffee
Copy link

I had this problem too, thanks Josh for the fix. Updating to quantmod 0.4-8 fixed for me on Os X 10.10.5 and R 3.3.0.

In case this is useful to anyone, I added the following line before calling getSymbols.yahoo as a workaround before Josh pushed his fix:
options(download.file.method = "libcurl")

@shaunec
Copy link

shaunec commented May 16, 2017

Has this bug reappeared in R 3.4.0?

getSymbols("AAPL", src="yahoo")
Error in download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, :
cannot open URL 'https://ichart.finance.yahoo.com/table.csv?s=AAPL&a=0&b=01&c=2007&d=4&e=16&f=2017&g=d&q=q&y=0&z=AAPL&x=.csv'
In addition: Warning message:
In download.file(paste(yahoo.URL, "s=", Symbols.name, "&a=", from.m, :
cannot open URL 'https://ichart.finance.yahoo.com/table.csv?s=AAPL&a=0&b=01&c=2007&d=4&e=16&f=2017&g=d&q=q&y=0&z=AAPL&x=.csv': HTTP status was '502 Bad Gateway'
sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Sierra 10.12.4

Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib

locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] RCurl_1.95-4.8 bitops_1.0-6 PerformanceAnalytics_1.4.3541
[4] quantmod_0.4-8 TTR_0.23-1 xts_0.9-7
[7] zoo_1.8-0

loaded via a namespace (and not attached):
[1] compiler_3.4.0 tools_3.4.0 grid_3.4.0 lattice_0.20-35

@joshuaulrich
Copy link
Owner

Has this bug reappeared in R 3.4.0?

No, this is a different issue. A "502 Bad Gatway" reponse is different from a "30X redirect" response. Not being able to follow the redirect was the issue here.

@nathalok
Copy link

nathalok commented May 17, 2017

Hi, I am also seeing this error - HTTP status was '502 Bad Gateway'. Here is the output of my sessionInfo() command :
Just wondering how is it working for others ?

sessionInfo()
R version 3.4.0 (2017-04-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252
[3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C
[5] LC_TIME=English_Australia.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] quantmod_0.4-8 TTR_0.23-1 xts_0.9-7 zoo_1.8-0

loaded via a namespace (and not attached):
[1] compiler_3.4.0 tools_3.4.0 grid_3.4.0 lattice_0.20-35

@bojanbis
Copy link

getSymbols seems to fail if the source is Yahoo; looks like Yahoo changed the link for historical data, so https://ichart.finance.yahoo.com/table.csv no longer works. Anybody has a clue how to fix this?

@spegmb
Copy link

spegmb commented May 19, 2017

It looks like Yahoo has just stopped that service, see this: https://forums.yahoo.net/t5/Yahoo-Finance-help/Is-Yahoo-Finance-API-broken/td-p/250503/page/5

@BenWiseman
Copy link

BenWiseman commented May 31, 2017

Yahoo is just sucking, you can force it to use Google like so:
getSymbols.google("AAPL",env = .GlobalEnv)

@nathalok
Copy link

nathalok commented Nov 1, 2017

Hi guys, I am experiencing error in getQuote. Has anyone seen this recently ?

getQuote('AAPL')

> getQuote('AAPL')
Error in download.file(paste("https://finance.yahoo.com/d/quotes.csv?s=",  : 
  cannot open URL 'https://finance.yahoo.com/d/quotes.csv?s=AAPL&f=d1t1l1c1p2ohgv'
In addition: Warning message:
In download.file(paste("https://finance.yahoo.com/d/quotes.csv?s=",  :
  cannot open URL 'https://finance.yahoo.com/d/quotes.csv?s=AAPL&f=d1t1l1c1p2ohgv': HTTP status was '999 Request denied'
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 8.1 x64 (build 9600)

Matrix products: default

locale:
[1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252    LC_MONETARY=English_Australia.1252 LC_NUMERIC=C                      
[5] LC_TIME=English_Australia.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rmarkdown_1.6   shiny_1.0.5     aws.s3_0.3.3    quantmod_0.4-10 TTR_0.23-1      xts_0.10-0      zoo_1.8-0 

@nheinzer1210
Copy link

at 4pm yesterday right when the markets closed it seems yahoo dropped the whole csv quote system, they made their historical data harder to scrape a few months ago so this just seems to be more going in the way of stopping scraping of their data.

@joshuaulrich
Copy link
Owner

@nathalok see #197. I was expecting the getQuote() API to change after what happened to the historical data API in May.

@nguinasso
Copy link

#' Yahoo GetQuote
#'
#' Gets quote for tics
#' Around Nov 1, 2017 Yahoo turned off their csv getQuote interface.
#' The json interface seems to be working and apears better and faster.
#' Thank pjheink on github for alerting us to this and providing this getQuote replacement
#' @param ticks Vector of symbols
#' @importFrom jsonlite fromJSON
#' @return dataframe with Time as 16 character string,Symbol,Price,Change,ChangePcnt,Name
#' @export
getQuote <- function(ticks=c("^SPX","VTI")) {
qRoot <- "https://query1.finance.yahoo.com/v7/finance/quote?"
qRoot1<- "fields=symbol,longName,regularMarketPrice,regularMarketChange,"
qRoot2<- "regularMarketChangePercent,regularMarketTime&formatted=false&symbols="
qRoot<- paste(paste(qRoot,qRoot1,sep=""),qRoot2,sep="")
z <- fromJSON(paste(qRoot, paste(ticks, collapse=","), sep=""))
z <- z$quoteResponse$result[,c("regularMarketTime","symbol", "regularMarketPrice",
"regularMarketChange","regularMarketChangePercent", "longName")]
#row.names(z) <- z$symbol
#z$symbol <- NULL
names(z) <- c("Time", "Symbol", "Price", "Change", "ChangePcnt","Name")
z$Time <- as.POSIXct(z$Time, origin = '1970-01-01 00:00:00')
z$Change <- round(z$Change,2)
z$ChangePcnt <- round(z$ChangePcnt,3)
z$Time <- substr(as.character(a),1,16)
return(z)
}
Now if something like this works on setSymbol, I will be back to normal.

@nguinasso
Copy link

installing quantmod_0.4-11 gihub gets a working version of getSymbols

@parayamelo
Copy link

I also get error:

from <- c("USD", "USD", "EUR", "GBP", "EUR", "EUR")
to <- c("CAD", "JPY", "USD", "CAD", "JPY", "AUD")
df <- getQuote(paste0(from, to, "=X"))
Error in download.file(paste("https://finance.yahoo.com/d/quotes.csv?s=", :
cannot open URL 'https://finance.yahoo.com/d/quotes.csv?s=USDCAD=X+USDJPY=X+EURUSD=X+GBPCAD=X+EURJPY=X+EURAUD=X&f=d1t1l1c1p2ohgv'
In addition: Warning message:
In download.file(paste("https://finance.yahoo.com/d/quotes.csv?s=", :
cannot open URL 'http://download.finance.yahoo.com/d/quotes.csv?s=USDCAD=X+USDJPY=X+EURUSD=X+GBPCAD=X+EURJPY=X+EURAUD=X&f=d1t1l1c1p2ohgv': HTTP status was '403 Forbidden'

quantmod v0.4.11
R version 3.4.2

@RajaPaul
Copy link

Hi,

It was working yesterday, today morning IST , getSymbols.yahoo broke

getSymbols("AAPL",auto.assign = F)
Warning: AAPL download failed; trying again.
Error: AAPL download failed after two attempts. Error message:
HTTP error 400.

But this seems to work:

getSymbols("AAPL",src="google")
[1] "AAPL"

but getSymbols google doesn't download information about indian stocks like :

getSymbols("SBIN.NS",src="google")

but this used to work till yesterday:

getSymbols("SBIN.NS",src="yahoo")
getSymbols("^NSEI",src="yahoo")

how to get it to work ??

Repository owner deleted a comment from shane0078 Nov 30, 2017
@tvkurien
Copy link

Broken even with latest quantmod from github.

sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.3 LTS

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] remotes_1.1.0 quantmod_0.4-11 devtools_1.13.4 TTR_0.23-2
[5] xts_0.10-0 zoo_1.8-0

loaded via a namespace (and not attached):
[1] lattice_0.20-35 digest_0.6.12 withr_2.1.0 grid_3.4.2
[5] R6_2.2.2 git2r_0.19.0 httr_1.3.1 curl_3.0
[9] tools_3.4.2 compiler_3.4.2 tcltk_3.4.2 memoise_1.1.0

getSymbols("SPY", verbose = TRUE)
downloading SPY .....

100 125 100 125 0 0 1216 0 --:--:-- --:--:-- --:--:-- 1275
Warning: SPY download failed; trying again.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 125 100 125 0 0 4353 0 --:--:-- --:--:-- --:--:-- 4353
Error: SPY download failed after two attempts. Error message:
HTTP error 400.

@joshuaulrich
Copy link
Owner

@tvkurien Your issue is not a HTTP -> HTTPS redirection issue (i.e. is not related to this issue), and has likely been fixed in the 202_getSymbols_scipen branch.

@joshuaulrich joshuaulrich changed the title Quantmod yahoo download broken? getSymbols.yahoo does not follow redirect to HTTPS Nov 30, 2017
@joshuaulrich
Copy link
Owner

I'm locking this issue to avoid more comments about unrelated issues.

Repository owner locked and limited conversation to collaborators Nov 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests