简体   繁体   English

雅虎财务历史数据

[英]Yahoo finance historical data by csv

I am used to getting data from Yahoo Finance by url in csv with a simple url request: 我习惯使用简单的url请求通过csv中的url从Yahoo Finance获取数据:

$data_url="http://download.finance.yahoo.com/d/quotes.csv?s=".$code."&d=".$m."&e=".$d."&f=".$y."&g=d&a=".$a."&b=".$b."&c=".$c."&ignore=.csv";

Then suddenly it stopped working, so I tried with many others but nothing. 然后突然停止工作了,所以我尝试了许多其他方法,但一无所获。

$data_url="https://ichart.finance.yahoo.com/table.csv?s=".$code."&d=".$m."&e=".$d."&f=".$y."&g=d&a=".$a."&b=".$b."&c=".$c."&ignore=.csv";
$data_url="https://download.finance.yahoo.com/d/quotes.csv?s=".$code."&d=".$m."&e=".$d."&f=".$y."&g=d&a=".$a."&b=".$b."&c=".$c."&ignore=.csv";
$data_url="https://finance.yahoo.com/d/quotes.csv?s=".$code."&d=".$m."&e=".$d."&f=".$y."&g=d&a=".$a."&b=".$b."&c=".$c."&ignore=.csv";
$data_url="https://real-chart.finance.yahoo.com/table.csv?s=".$code."&d=".$m."&e=".$d."&f=".$y."&g=d&a=".$a."&b=".$b."&c=".$c."&ignore=.csv";

I checked Yahoo Finance URL not working 我检查了Yahoo Finance URL不起作用

But for php it seems there is no solution. 但是对于php来说似乎没有解决方案。 Can someone help me in building the php code? 有人可以帮助我建立PHP代码吗?

Yahoo Finance API已停产 ,不会重新引入。

We use the Yahoo Finance API to grab daily rates and historical rates. 我们使用Yahoo Finance API获取每日汇率和历史汇率。 The daily rates is still working for us using a URL to query. 使用网址进行查询的每日费率仍对我们有效。 The historical rates are returning results but say the day is invalid (such as a weekend). 历史汇率正在返回结果,但表示日期无效(例如周末)。 Where did you see the Finance API is discontinued as I still get daily rates. 您在哪里看到Finance API停止使用,因为我仍然可以获取每日费率。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM