Skip to content

Commit

Permalink
Switch quote data to v6 endpoint, since v7 stopped working (Unauthori…
Browse files Browse the repository at this point in the history
…zed / Invalid cookie / Invalid crumb)

Fixes #38
Fixes #39
  • Loading branch information
scheb committed May 7, 2023
1 parent 0b6e9db commit 8365dfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public function getExchangeRates(array $currencyPairs): array
*/
private function fetchQuotes(array $symbols): array
{
$url = 'https://query1.finance.yahoo.com/v7/finance/quote?symbols='.urlencode(implode(',', $symbols));
$url = 'https://query1.finance.yahoo.com/v6/finance/quote?symbols='.urlencode(implode(',', $symbols));

This comment has been minimized.

Copy link
@nikunjsoni001

nikunjsoni001 May 25, 2023

hi @scheb ,
I think version 6 has stopped working and responding with 404 responses. please have a look at it.

Updated link for reference: https://query1.finance.yahoo.com/v10/finance/quoteSummary/AAPL?modules=summaryDetail

This comment has been minimized.

Copy link
@scheb

scheb May 25, 2023

Author Owner

Thanks, please follow along the conversation here: #40

$responseBody = (string) $this->client->request('GET', $url)->getBody();

return $this->resultDecoder->transformQuotes($responseBody);
Expand Down

0 comments on commit 8365dfe

Please sign in to comment.