1

I am used to getting data from Yahoo Finance by url in csv with a simple url request:

$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

But for php it seems there is no solution. Can someone help me in building the php code?

niton
  • 8,771
  • 21
  • 32
  • 52
illinois
  • 500
  • 1
  • 4
  • 16
  • Possible duplicate of [Yahoo Finance URL not working](https://stackoverflow.com/questions/44030983/yahoo-finance-url-not-working) – Candamir Jun 28 '17 at 10:01

2 Answers2

0

The Yahoo Finance API was discontinued and will not be reintroduced.

Alex Alifimoff
  • 1,850
  • 2
  • 17
  • 34
0

We use the Yahoo Finance API to grab daily rates and historical rates. 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.