karlwancl / YahooFinanceApi

A handy Yahoo! Finance api wrapper, based on .NET Standard 2.0

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there a limit to amount of symbols you can request at once?

dotnetshadow opened this issue · comments

Great Library, I was wondering if there is a limit to the amount of stocks you can request at once?

The reason I ask is sometimes I request 200 stocks and I get like 197 back, then other times it returns 196

I did another test where I would request 100 symbols, and most of the time I get 99 back and a couple of times it returned 100, all within the space of seconds of testing

I'm just wondering if there is limitation somehow?

UPDATE
I think the issue I'm facing is that yahoo sometimes returns "invalid / non strading" stocks with their results, other times it omits them.

image
https://au.finance.yahoo.com/quote/AIO.AX?p=AIO.AX

So from the above screenshot you can see that the stock returns 0 for ask / bid price. It's usually an indication that the stock might not be trading.

Just thought it would be good information for others who tend to see different results coming back

Unfortunately the Yahoo API is not something that you can blindly relay on.
I mainly using historical API, but the failing reason should be similar.

I found out that there are symbols that keep failing more than others (for instance PPC, MU).
By more I mean: many bad requests (400) or success (200) with empty data (nulls).
I have no idea why, but maybe those requests are collected from different endpoints than others.

Moreover I observe that when queried those tickers for 2 to 3 years of data can failed persistently while passing against small amount of data (like 30days).

That's lead me to conclusion that if you ask for smaller data then the better are chances to retrieve valid response.

@delvier thanks for the information, do you happen to know if there is a rate limit for making calls to the Yahoo API?

@dotnetshadow I don't know to be honest. But I think it's quite high, I could not reach any limits making thousand of requests per minute during intensive testing.

YahooFinanceApi does not impose any limitations on the number of symbols requested. I was able to download 1000 symbols. I noticed that larger number of symbols is limited by URI length.

@dshe cheers thanks for that appreciate it

@dotnetshadow Is your concern being tackled? I will close the issue if it is the case, thanks!

@Ippkarl yes thanks 👍