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

getFX not working on Linux & Mac OS (works on Win10) #83

Closed
traxx84 opened this issue Mar 24, 2016 · 2 comments
Closed

getFX not working on Linux & Mac OS (works on Win10) #83

traxx84 opened this issue Mar 24, 2016 · 2 comments
Labels
Milestone

Comments

@traxx84
Copy link

traxx84 commented Mar 24, 2016

Seems as getFX isnt working since today on Linux (Ubuntu) and Mac OS (10.11.3), it does work on Windows 10.
quantmod_0.4-5

getFX("EUR/USD")
Error in download.file(oanda.URL, destfile = tmp, quiet = !verbose) :
cannot open URL 'http://www.oanda.com/currency/historical-rates/download?quote_currency=EUR&end_date=2016-03-24&start_date=2014-11-11&period=daily&display=absolute&rate=0&data_range=y2&price=mid&view=table&base_currency_0=USD&base_currency_1=&base_currency_2=&base_currency_3=&base_currency_4=&download=csv'

@joshuaulrich
Copy link
Owner

I can replicate the behavior: error on my Ubuntu machine, no issue on my Windows machine.

Looks like a problem with libcurl, which is not related to quantmod, so I am closing. You can work-around the issue by setting the download.file.method option to something other than "libcurl".

> require(quantmod)
> getFX("EUR/USD")
Error in download.file(oanda.URL, destfile = tmp, quiet = !verbose) : 
  cannot open URL 'http://www.oanda.com/currency/historical-rates/download?quote_currency=EUR&end_date=2016-03-24&start_date=2014-11-11&period=daily&display=absolute&rate=0&data_range=y2&price=mid&view=table&base_currency_0=USD&base_currency_1=&base_currency_2=&base_currency_3=&base_currency_4=&download=csv'
> options(download.file.method="wget")
> getFX("EUR/USD")
[1] "EURUSD"
> head(EURUSD)
           EUR.USD
2014-11-11  1.2432
2014-11-12  1.2462
2014-11-13  1.2456
2014-11-14  1.2466
2014-11-15  1.2525
2014-11-16  1.2525

@joshuaulrich
Copy link
Owner

This was an issue with Oanda changing the url from http to https. Fixed in 3f56737.

@joshuaulrich joshuaulrich added this to the Release 0.4-6 milestone Apr 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants