本文介绍了以编程方式按日期从雅虎财务中获取货币汇率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我找到了这个问题非常有用的答案,但我想还可以获得过去日期的汇率,而不仅仅是今天的汇率。我正在编写一个iPhone应用程序,它使用汇率来计算不同国家的销售额。I found the answer to this question VERY useful, but I would like to also get exchange rates for dates in the past, not just today's exchange rates. I'm writing an iPhone app that uses the exchange rate to calculate money made from sales in different countries.以上是上述答案的例子,以获得今天英镑兑换欧元的汇率: http://download.finance.yahoo.com/d/quotes.csv? s = GBPEUR = X& f = sl1d1t1ba& e = .csvHere's the example from the answer mentioned above to get today's echange rate for GBP to EUR:http://download.finance.yahoo.com/d/quotes.csv?s=GBPEUR=X&f=sl1d1t1ba&e=.csv有没有人知道如何为其他日期执行此操作? 谢谢!Does anyone know how to do this for any other dates?THANK YOU!推荐答案要检索货币汇率的历史数据,您不能使用Yahoo Finance。他们的API仅提供股票的历史数据。例如,2003年4月1日至7月30日之间的APPLE:To retrieve historical data of currency exchange rates, you can't use Yahoo Finance. Their API only offers historical data of stocks. For example for APPLE between April the 1st 2003 and July, 30: http://ichart.finance.yahoo.com/table.csv ?s = AAPL& a = 3& b = 1& c = 2003& d = 6& e = 30& f = 2003& g = d& ignore = .csv所以,在你的情况下,你需要挖掘其他地方。唯一可用的其他主要API是OpenExchangeRate: http://openexchangerates.org/documentation#historical-dataSo, in your case you need to dig somewhere else. The only other main API available is OpenExchangeRate:http://openexchangerates.org/documentation#historical-data 注意: 其他选项: 你可以使用此:免费外汇历史数据,然后使用雅虎财经(货币汇率)每天(在您方便时)建立一个包含您所需的所有货币汇率的最新表格。Other option:You could use this: Free Forex Historical Data and then use Yahoo Finance (Currency Rates) each day (at your convenience) to construct an up-to-date table with all your currencies rates needed.美联储为您提供多种货币汇率的历史数据。参见数据下载程序以检索(csv,xls,xml)历史数据。您可以根据自己的需要进行调整。The FED offers you historical data of many currencies rates. See Data Download Program to retrieve (csv, xls, xml) historical data. You can adapt it to your needs. 这篇关于以编程方式按日期从雅虎财务中获取货币汇率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-23 00:40