2015-02-09 63 views
4

我想获得货币和金属的数据。当我尝试了一些软件包时,许多人建议quantmod。所以我用getSymbols如下所示:getSymbols仍然可以与oanda一起使用吗?

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' 

为我所用:

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

我得到了同样的信息。

那么getSymbols仍然可以与Oanda合作?

另一个问题是我可以在哪里找到诸如Yahoo,Oanda,Google等网络服务的符号列表?事实上,我不需要股票的符号,我只需要未来的象征,如玉米,黄金和货币。

回答

4

Oanda更改了它们的URL结构和文件格式。我fixed this over the weekend。您需要查看各个提供商的网站,才能找到他们支持的符号。

+0

谢谢。它现在很好用。 – kanpu 2015-03-12 14:06:53

相关问题