https://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.xchange where pair in (“ARSARS")&env=store://datatables.org/alltableswithkeys [英] https://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.xchange where pair in ("ARSARS")&env=store://datatables.org/alltableswithkeys
问题描述
过去 3 年我一直在使用以下 URL,没有出现任何问题.但是,它已停止返回结果.
I have been using the following URL for the past 3 years without issue. However, it has stopped returning results.
网址:https://query.yahooapis.com/v1/public/yql?q=select * 来自 yahoo.finance.xchange where pair in ("ARSARS")&env=store://datatables.org/alltableswithkeys
URL: https://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.xchange where pair in ("ARSARS")&env=store://datatables.org/alltableswithkeys
现在返回以下内容:
<?xml version="1.0" encoding="UTF-8"?>
<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng" yahoo:count="0" yahoo:created="2017-11-02T09:33:25Z" yahoo:lang="en-AU">
<results/>
</query><!-- total: 9 -->
注意没有结果,它只有结果"标签.
我已经尝试过很多不同的计算机和浏览器.我也尝试过更改货币组合,但没有成功.
Notice how there are no results, it simply has the tag "results".
I have tried on this many different computers and browsers. I have also tried changing the currency combinations, but no luck.
有人能发现我做错了什么吗?
Can anybody spot what I am doing wrong?
推荐答案
是的,雅虎似乎已经停止了他们的货币转换器 API 服务.
Yes, it looks like Yahoo has discontinued their Currency Converter API service.
我发现了一个不同的网站:https://currencylayer.com/
I found a different site : https://currencylayer.com/
它们允许您请求货币汇率(1 美元 = 168 种其他货币).如果您每月的请求少于 1000 个,则它是免费的(如果您需要更多,他们有不同的订阅:https://currencylayer.com/product).
They let you request currency rates (1 USD = 168 other currencies). If you make less than 1000 requests per month, it is free (if you need more, they have different subscriptions : https://currencylayer.com/product).
您只需要注册并接收您自己的访问代码.一旦你有了它,那么你只需拨打电话 http://apilayer.net/api/live?access_key= 它将返回其他货币汇率的 JSON.
You just need to sign up and receive your own Access Code. Once you have that, then you simply make the call http://apilayer.net/api/live?access_key= and it will return JSON of the other currency rates.
他们还在 https://currencylayer.com/documentation 上提供了 PHP、JavaScript 和 Java 代码示例
They also have code examples in PHP, JavaScript, and Java at https://currencylayer.com/documentation
发现立即开始使用他们的 API 非常容易.
Found it very easy to get started using their API right away.
这篇关于https://query.yahooapis.com/v1/public/yql?q=select * from yahoo.finance.xchange where pair in (“ARSARS")&env=store://datatables.org/alltableswithkeys的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!