achannarasappa / ticker

Terminal stock ticker with live updates and position tracking
GNU General Public License v3.0
4.94k stars 264 forks source link

ERROR RESTY unexpected response from Yahoo API: non-2xx response code: 307 Temporary Redirect #263

Open reece146 opened 7 months ago

reece146 commented 7 months ago

The last few days ticker hasn't been working properly. After start up it fails to prompt with:

ERROR RESTY unexpected response from Yahoo API: non-2xx response code: 307 Temporary Redirect Error: unexpected response from Yahoo API: non-2xx response code: 307 Temporary Redirect

Not a coder but I'm guessing Yahoo changed something in their API or is monkeying with what is fronting the API.

I think this started on Monday but am not certain.

Environment:

Thanks.

achannarasappa commented 7 months ago

Thanks for reporting! Yes it's likely related to an API change but the strange thing is the contract test is still passing which should detect this kind of problem automatically. I'll have a closer look today.

If you don't mind, could you share the country you are in? I've found instances where the API responds differently in various regions (e.g. EU because of GDPR)

reece146 commented 7 months ago

Great stuff.

I'm in Canada.

RTDecko commented 7 months ago

Experiencing same problem.

I'm in the US.

achannarasappa commented 7 months ago

There was a bug which resulted in this error message being incorrectly returned. I've pushed a fix for the error message but the underlying issue is that Coingecko now effectively requires an API key to use (1-2 API calls / min down from 30 API calls / min)

{"status":{"error_code":429,"error_message":"You've exceeded the Rate Limit. Please visit https://www.coingecko.com/en/api/pricing to subscribe to our API plans for higher rate limits."}}

As a workaround, you can use the symbols for crypto assets listed on Yahoo (e.g. SOL-USD) rather than Coingecko (SOLANA.CG or SOL.X).

As a permanent fix, either Coingecko needs to be replaced by another price feed or an option needs to be added to set a Coingecko API key. Lookout for an update in the near future to address this issue.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.