node-yahoo-finance2 icon indicating copy to clipboard operation
node-yahoo-finance2 copied to clipboard

Usage restriction and potential bans

Open Monabr opened this issue 3 years ago • 1 comments

Are there any restrictions on the use of the service? For example, if a constant stream of requests comes from the same IP address, won't this lead to a ban of such an IP address from the service side? What's the best way to use this service? (intervals, etc.)

Monabr avatar Nov 23 '21 23:11 Monabr

Hey @Monabr, thanks for your patience.

I've only encountered bans when performing many simultaneous requests. It wasn't actually clear what the exact number was, when we re-ran all our network tests in one go, we got such a ban.

Since then, yahoo-finance2 has built in concurrency limits, you can read about it at https://github.com/gadicc/node-yahoo-finance2/blob/devel/docs/concurrency.md. In short, out the box, yahoo-finance2 will limit you to 4 simultaneous requests, and we've never encountered any further issues since adding this feature. It may still be possible though.

Regarding other restrictions, just bear in mind that the Yahoo data is meant for the personal use of Yahoo users only. They don't seem to mind people people using their data for small personal projects (even though they don't offer any service guarantees or support). While I can't say for sure, I imagine any commercial use of their data is dangerous territory.

gadicc avatar Dec 22 '21 08:12 gadicc