ticker icon indicating copy to clipboard operation
ticker copied to clipboard

Break apart Yahoo API requests into no more than 50 symbols at a time

Open kdkd opened this issue 9 months ago • 3 comments

Yahoo has recently started limiting the number of symbols you can request at a time. I wasn't able to figure out the exact limit, but somewhere between 65 and 100 symbols at once will return a "429 Too Many Requests" error, causing ticker to just display a mostly blank page with no symbols appearing at all. This patch breaks things up into requests of no more than 50 symbols at a time.

kdkd avatar Mar 31 '25 19:03 kdkd

Thanks for identifying this issue and proposing a fix!

I'll need to test this a bit to understand the limitation better. I don't have a good solution at the moment but there's also a good chance that this will start to get blocked after a certain number of symbols are added to the watchlist since it will issue N / 50 requests in parallel where N is the number of symbols on the watchlist.

achannarasappa avatar Mar 31 '25 23:03 achannarasappa

Agreed, I thought a better way would be to do maybe 50 at a time and rotate between which batch of 50 gets polled per interval, but I was having trouble making that work where only a partial result got returned each time.So far with about 300 symbols I haven't hit any rate limits this way, but I'm guessing eventually Yahoo will stop this too.

kdkd avatar Apr 01 '25 03:04 kdkd

At some point in the last week or so, Yahoo stopped returning an error when sending my full (~300) symbol list, and the currently released version works again. I'm not sure if this patch is still needed, but it still might be a good idea to not go crazy on what we're requesting from Yahoo to hopefully give them no reason to turn this back on.

kdkd avatar Apr 13 '25 13:04 kdkd

This pr 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.

github-actions[bot] avatar Oct 11 '25 02:10 github-actions[bot]