pilwon / node-yahoo-finance

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

Future of project / v2 #75

Open gadicc opened 3 years ago

gadicc commented 3 years ago

TL;DR;

Hey @pilwon

I've been giving some thought as to some changes I'd like to make moving forward, which I'll detail below. I don't really want to do anything on the current version since things have been stable for years. I'd love to hear your thoughts and feelings about your intention for the future of the project and how these relate, e.g.

Depending on your thoughts on the above, I could either start a new repo of my own, or we could do a new branch here if you'd like to add me as maintainer and are ok with all the automation.

To be honest though, I think I'd like to start from scratch and play around a bit, without worrying about backwards compatibility or maintaining the existing code patterns. To that end, I may well just start a new repo and see what develops. Once it becomes stable, we could decide what to do.

Just wanted to give you a heads up and hear your thoughts. Not even sure when I'll even have time to work on this, but wanted to get a feel for things. Thanks and hope all's well your side! :)

gadicc commented 3 years ago

For those who want to follow along, I'll be working at https://github.com/gadicc/node-yahoo-finance2. Thanks to @DDeme nudging me there will be typescript support! (my first time)

DO NOT USE "yahoo-finance2" (above repo) FOR ANYTHING. CONTINUE USING "yahoo-finance" (this repo) FOR EVERYTHING.

"yahoo-finance2" is all experimentation. It could be useful for other APIs not offered by "yahoo-finance" (e.g. "search") When "yahoo-finance2" becomes stable, @pilwon and I will decide how to best proceed.

There is no timetable. There is nothing for you to see or use unless you want to encourage or contribute to development.

Thanks everyone :)

gadicc commented 3 years ago

In case anyone is following here, would love some feedback on what's done so far. The TypeScript support is really great, e.g.:

typescript demo

There's a live demo at https://codesandbox.io/s/yahoo-finance2-312x2?file=/src/index.ts.

pudgereyem commented 3 years ago

@gadicc Hey man, I'm just trying out node-yahoo-finance but are more than happy to check out the new version as well.

gadicc commented 3 years ago

Thanks, @pudgereyem, that would be great. The current node-yahoo-finance has been stable for years. The "new" version is a rewrite from scratch with all kinds of things we didn't dare do before. It's currently in "beta". It has great unit test coverage but less testing "in the wild". Report backs from other users will be a great help in helping us figure out how best to progress with it.

E.g. quoteSummary tests all sub-modules against stocks from four different exchanges, but occasionally I still run into a stock I haven't used before which has more data or less data than I've encountered before, and it fails our validation checks - so great to be aware of new cases like this. But overall the type safeness is a big win for everyone.

pilwon commented 3 years ago

@gadicc Sorry for not checking and sharing feedback earlier. I meant to do a TS rewrite for years but it never happened. I have just invited you as collaborator to this repo and also added you as owner for yahoo-finance npm package. Once your TS version development is completed, please consider publishing to yahoo-finance as new major version since having two repos/packages could confuse people. I definitely agree with the new direction you suggested above. I love your module approach. I'll check out your WIP codebase.

gadicc commented 3 years ago

Hey @pilwon! All good, my dear friend. Truuuuust me, I know all about having a busy life and then getting endless GitHub notifications for old open source projects. As you saw, I've wanted to do work more work here for years too, and finally had some time for it now and wanted to give back.

Thanks so much, that sounds awesome! I've been careful to be very clear to everyone that this is a beta release and only for people who want to help out with development, and that anyone else should remain using the current node-yahoo-finance. I think I wrote somewhere that I'd like to keep it in beta until the middle of the year or so, since v1 has been stable for years, and that then you and I would then decide on how to best proceed. So what you suggested is great... I'm very happy you like what I've done so far and consider it a worthy candidate for the next release here!

I'll just add that I put in a lot of effort to make the project highly maintainable from the beginning and it's really paid off! It's still just the beginning and already so many PRs have come in, including some notable contributions from @pudgereyem and @PythonCreator27. Current pain point is the runtime validation of data we get from Yahoo, to make sure the TypeScript interfaces are correct... I've kept it a little strict to make sure the user gets predictable results, which is resulting in some short term pain now but I think will be well worth it for the rest of the life of the library.

Any comments you may have on anything will always be welcome.

pilwon commented 3 years ago

@gadicc This project would have died a long time ago without your PRs :) Now with all these new retail investors flown into the stock market and also the wide adoption of TypeScript, many developers could benefit from our work put into yahoo-finance npm package. I will try to find more time in the coming months to contribute more to this project.

gadicc commented 3 years ago

Thanks @pilwon you're very kind :) Yes it's interesting times! I see someone is already using the package to show stocks on his TV... which stocks? GME, NOK and BB :sweat_smile: As for TypeScript, it's actually my very first time using it, and it rocks (after all the initial learning pain, of course). Thanks, that would be awesome! Whenever the timing is right :raised_hands: