我已经使用这个feed很长时间了,我相信苹果在mac的一个小部件中也能做到这一点.但真正奇怪的是,我根本找不到它的任何文档,我试过谷歌和所有东西.

http://finance.yahoo.com/webservice/v1/symbols/allcurrencies/quote

我可以看到人们使用不同的参数,比如view=basic date=Ymd; currency=true,但很可怕,没有任何官方数据.

目前,我正在使用以下参数:

format=json and callback=list sometimes...

但这对我来说仍然是个谜.有没有人知道这件事的真实真相,因为雅虎似乎正试图将其隐藏在其他地方:)

推荐答案

From the research that I've done, there doesn't appear to be any documentation available for the API you're using. Depending on the data you're trying to get, I'd recommend using Yahoo's YQL API for accessing Yahoo Finance (An example can be found here). Alternatively, you could try using this well documented way to get CSV data from Yahoo Finance.

EDIT:

There has been some discussion on the Yahoo developer forums and it looks like there is no documentation (emphasis mine):

缺少文件的原因是we don't have a Finance API个.似乎有些人已经反向设计了一个用于提取金融数据的API,但他们这样做违反了我们的服务条款(没有重新分配金融数据),因此我建议您避免使用这些Web服务.

At the same time, the URL you've listed can be accessed using the YQL console, though I'm not savvy enough to know how to extract URL parameters with it.

Json相关问答推荐

当有嵌套数组而没有嵌套数组时,展平JSON

数据到jsonObject到数据到 struct 是可能的吗?

419(未知状态)使用laravel处理PUT请求

基于 JSON 字段的 Jolt 条件标志

在linux控制台中解析json字符串的最简单方法是什么?

基于JQ中另一个对象的值 Select 对象

正向闪烁后的微调值

try 使用 JQ 转换 JSON 中过于复杂的对象数组

如何 Select 一个值,这是可选的 - 使用 jq

如果 JSON 对象包含列表中的子字符串,则丢弃它们

JOLT 转换 - 删除 JSON 数组中的空 node

如何使用 gson 调用默认反序列化

通过 RestAssured 中的 JsonPath 访问匿名数组的元素

没有默认构造函数的杰克逊第 3 方类

将 Objective-C 对象序列化和反序列化为 JSON

使用 JSON.Net 的 C# 到 JSON 序列化

Jersey 2.0 相当于 POJOMappingFeature

在 iPhone 上解析 JSON 日期

有没有一种快速的方法可以在文本编辑器中将 JavaScript 对象转换为有效的 JSON?

我如何反序列化以杰克逊为单位的时间戳?