pilwon / node-yahoo-finance

Yahoo Finance historical quotes and snapshot data downloader written in Node.js
488 stars 123 forks source link

adding optional events (split, capital and div) #82

Open CauaMatheus opened 2 years ago

CauaMatheus commented 2 years ago

Today at work i had to fetch some data from yahoo, i used this lib to do this. But when i was trying to fetch the stock splits, i was not able to select the type. So this pull request was made to resolve this problem.

This pull request its just to the people be able to select the type of events they wanna fetch, can be "split", "div", "capital" and by default "history"

gadicc commented 2 years ago

Hey @CauaMatheus, thanks for this.

Regrettably as mentioned in the README, v1 of the library has been feature frozen since April.

As it happens however, v2 has a similar limitation in the historical module, although this pull request addresses it. It has a nice workaround which actually can retrieve all event types in a single network request (using the chart API under the hood).

Anyway since your change is so simple, let's leave this open for now and see what happens :)