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.oanda HTTP error 404 #225

Closed
mgpap opened this issue Apr 4, 2018 · 10 comments
Closed

getSymbols.oanda HTTP error 404 #225

mgpap opened this issue Apr 4, 2018 · 10 comments
Assignees
Labels

Comments

@mgpap
Copy link

mgpap commented Apr 4, 2018

I try to get some symbols from Oanda and I can't. I have tried also Google and Yahoo and the result is the same. I try to execute the following and what I get is an error.

eurusd  <-  getSymbols("EUR/USD", src = "oanda", auto.assign = FALSE)
Error in open.connection(con, "rb") : HTTP error 404.
@joshuaulrich
Copy link
Owner

Thanks for the report. I can replicate.

Google no longer provides price data. I checked Yahoo Finance and they specify the EUR/USD pair as EURUSD=X, so getSymbols("USDEUR=X", src = "yahoo") works.

@mgpap
Copy link
Author

mgpap commented Apr 5, 2018

Thanks for the reply.

Yes,now I can get from Yahoo. But,what about oanda? I still can't use getSymbols with oanda. Is it maybe because oanda v1 REST API will cease to function?

@joshuaulrich joshuaulrich changed the title HTTP error 404. getSymbols.oanda HTTP error 404 Apr 5, 2018
joshuaulrich added a commit that referenced this issue Apr 5, 2018
The previous URL was returning HTTP 404 errors.

Fixes #225.
@joshuaulrich
Copy link
Owner

@MihalisPapatsimpas I just pushed a branch that works for me. Please test to see if it works for you too!

@mgpap
Copy link
Author

mgpap commented Apr 5, 2018

Thank you @joshuaulrich for your help! To test it,I installed the quantmod package from your repository using the following: devtools::install_github("joshuaulrich/quantmod"). The error still appears. Is this the right way to test it?

Thanks again!

@joshuaulrich
Copy link
Owner

No, that will just pull the current HEAD of master. My patch is on the branch 225_getsymbols_oanda. I think you can pull and install that via: devtools::install_github("joshuaulrich/quantmod", ref="225_getsymbols_oanda"). If that doesn't work, please read the devtools docs or search on Google and/or StackOverflow. I don't use devtools, so I won't be much help.

@mgpap
Copy link
Author

mgpap commented Apr 5, 2018

I installed the patch in 2 ways. The one you suggested and:
githubinstall :: gh_install_packages("quantmod",ref="225_getsymbols_oanda"). Both work but the error remains.

@joshuaulrich
Copy link
Owner

Is it exactly the same error? I just tried on a different machine and got "HTTP error 400". 400 is "bad request", and 404 is "not found".

@mgpap
Copy link
Author

mgpap commented Apr 5, 2018

No,sorry i didn't mention it. It is "Error in open.connection(con, "rb") : HTTP error 400" .

joshuaulrich added a commit that referenced this issue Apr 5, 2018
The previous URL was returning HTTP 404 errors.

Fixes #225.
@joshuaulrich
Copy link
Owner

I just pushed an update that corrects a mistake I made. It works for me now, I promise. :)

@mgpap
Copy link
Author

mgpap commented Apr 5, 2018

Yes, now it works perfect!!

Thanks for your time!

@joshuaulrich joshuaulrich self-assigned this Apr 5, 2018
@mgpap mgpap closed this as completed Apr 5, 2018
@joshuaulrich joshuaulrich added this to the Release 0.4-13 milestone Nov 24, 2018
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