Can getSymbols still work with oanda?

半城伤御伤魂 提交于 2019-12-10 17:31:59

问题


I want to get the data of currencies and metals. As I tried some packages, many person suggest quantmod. So I used getSymbols as the following:

getSymbols("USD/EUR",src="oanda")
Error in download.file(paste(oanda.URL, from.date, to.date, "exch=", currency.pair[1],  : 
cannot open URL 'http://www.oanda.com/convert/fxhistory?lang=en&date1=09%2F28%2F13&date=02%2F09%2F15&date_fmt=us&exch=USD&expr2=EUR&margin_fixed=0&SUBMIT=Get+Table&format=CSV&redirected=1'
In addition: Warning message:
In download.file(paste(oanda.URL, from.date, to.date, "exch=", currency.pair[1],  :
  cannot open: HTTP status was '404 Not Found'

as I used:

getSymbols("USD/EUR",src="oanda",from="2015-01-01")

I get the same message.

So getSymbols can still work with Oanda?

And another question is where I can find the list of the symbols that the web-service such as Yahoo, Oanda, Google supported? In fact I don't need the stock symbols, I just need the symbols for the future such as corn, gold and the currency.


回答1:


Oanda changed their URL structure and file format. I fixed this over the weekend. You would need to look on the website of each respective provider in order to find what symbols they support.



来源:https://stackoverflow.com/questions/28411713/can-getsymbols-still-work-with-oanda

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!