Closed gadicc closed 3 years ago
Hi @gadicc / @pilwon - Really looking forward to get the new version that includes the multiple symbols in one request. This is so much needed to avoid breaking my project.
Huge thanks for the awesome work you've been doing :)
@pilwon I've just tested the recent commit made by @gadicc and both 'quote' and 'historical' are working properly with the long awaited multiple symbols in single query.
@gadicc Do you think multiple symbols feature is good enough to be merged? @talbensimon seems happy with his test results.
OK, here is an updated list of issues I've discovered so far:
On the first run there is an error which doesn't occur afterwards. Unhandled rejection Error: Failed to get crumb (str.trim is not a function) at /app/node_modules/yahoo-finance/lib/yahooCrumb.js:72:13
There is still the annoying warning upon each call [yahoo-finance] Warning, Yahoo completely changed their API recently. quote() replaces the deprecated snapshot(), but is brand new. Please report any issues. This notice will be removed in the next release.
Other than that, it's working fine :) @gadicc @pilwon
Hi @pilwon, @talbensimon. Sorry for the late reply. Unfortunately a lot of time sensitive issues have come up for me lately and it will be another week or two until I can look at this again. From what I recall all the work I did until now was with tests, so if @talbensimon is confirming it works, we could release, and I'll address the other outstanding issues as soon as I can.
@talbensimon, your first issue (about str.trim
) might be from upgrading an existing install with an older version of tough-cookie. Try rm -rf node-modules
and npm i
(or yarn install
) again and see if the error goes away.
Thanks @gadicc, it indeed solved the first issue!
You guys are doing awesome. I found a cool URL playing around looking at Yahoo's own code while trying to fix my own and create a new intra-day option. If you want to take a look at it. I think with this you guys could bring back periods and intervals.
Valid Intervals: [1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo] Valid Ranges :["1d","5d","1mo","3mo","6mo","1y","2y","5y","10y","ytd","max"] so far Ive noticed 1d acutally works in increments so you can do 1d, 2d, 9d, etc
Cheering everyone on in this PR!
Reading through the comments it reads as if the code has been amended to handle Yahoo's changes. Is that correct? Will 'npm install --save yahoo-finance' give me the correct version?
Please, can you merge multiply symbol? Better in future create merge request for every new feature
@Luchanso Please check out @gadicc's PR #47.
Yeah, all, pilwon just merged PR #47 and published as v0.3.3 - that's all my work on this from earlier this year. I still wanted to leave this PR open to track the rest of the changes, which in my mind are still critical for this to be considered "finished". And as per earlier comment, I do regret how some big unexpected commitments totally halted my work on this until now. Still hoping to try to finish this off as soon as I can.
How do I use it with ES2015?
Hi @GuilhermeZaniniMoreira
If you don't pass historical()
or quote()
a callback as the final parameter, they'll return a promise, which can be used with ES2017 async/await (is that what you meant?).
There are some examples in the full quote docs, which includes a convenient shortcut API, e.g.
const result = await quote('TSLA'); // implies default modules below
const result = await quote('TSLA', ['summaryDetail', 'recommendationTrend']);
or as just a regular promise:
quote('TSLA').then(function(data) { console.log(data); });
Is this still being worked on?
@stuckinaboot, @pilwon - I regret I never got to finish this exactly how I wanted, however, I may have been a bit too pedantic, as even without the extra resiliency I'd planned, all the previously submitted code has continued to work great for years.
@pilwon, I've just made some changes to the README to cleanup the notices and add a bit a note about the first request taking longer. I think let's merge and close?
When it will be merged ?
@DDeme do note that the only part left of this PR that hasn't been merged yet are some updates to the README, all the code is already in the released version.
Great do you have any plans to migrate to typescript?
Sure, why not, that's a good idea. It will be my first time using typescript :sweat_smile:
@DDeme, re typescript, see https://github.com/pilwon/node-yahoo-finance/issues/75#issuecomment-771587499.
Great that the merge seems very close, what version should we wait for?
Hey @kuworking, it's only really some changes to the README we still have to do, all the code parts have been merged already and have been stable for years :sweat_smile:
You're welcome to also check out the work happening at node-yahoo-finance2 although I think we'll keep that in beta for 3-6 months before making any official recommendations.
Then thanks god I've asked, I could have been waiting for years 🤓
What's the difference between the two? Is it a major rewriting? And thanks a lot for this development, I'm gonna try it right now 🙌
:laughing:
Yes, exactly. The v2 candidate is a complete rewrite from scratch, whereas the current version has been stable for years. So we'll keep it in beta for some time before making any official recommendations.
I made an update at the top of the this post for clarity and I'll hope we'll merge the rest soon.
Sure, why not, that's a good idea. It will be my first time using typescript 😅
Need some assistance?
Hey @darren-outdev, thanks. Did you mean assistance with TypeScript or in general?
In any case, both are very welcome. See where we're at at https://github.com/gadicc/node-yahoo-finance2.
In general: we just need help testing the library (which is in beta now). Re typescript: I think I got up to speed quick but please let me know if you notice anything wrong or unconventional.
Thanks!
Oh wow, you've gotten far! Well done :) Yeah I meant specifically with TS, been using it for years. I'll browse around the linked project and use the standard contributions method if I have updates
Thanks and thanks, @darren-outdev! That would be awesome :grin:
Merged and published as v0.3.7.
Thanks, @pilwon! :grinning:
Update: All the code parts of this PR are merged, released and have been stable for years. You're welcome to check out work on the v2 candidate, in beta probably until mid-2021, at which stage we'll make some official recommendations.
Continuation from #37, #41. Work in Progress.
getCrumb()
usage to withindownload()
getCrumb()
completes.quote()
symbols
option (i.e. multiple symbols in one request - this needs multiple HTTP requests in yahoo's new API).