-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New _chart module feedback #336
Comments
Agreed - I thought the output format @PythonCreator27 chose was generally easy to work with. FWIW my client code combines the historical prices, dividends, and splits into a giant 2D array so I can operate on the entire chunk of data efficiently, but I'm not sure that's a common enough use case to consider just having the chart module output that format. I think as it is now is better because it's more explicit (and thus understandable) to users. |
Thanks, @huned. Having also had some time to think about this, I've decided I'd like to offer both formats. With certain charting libraries, Yahoo's original input may indeed be easier to work with, and I'd like to avoid a situation where to convert to the array format only for the user to then need to write their own conversion code just go get back to the data we already had. I imagine it will turn out similar to quote, so say: yf2._chart('AAPL', { period1, return: "array" }); // default
yf2._chart('AAPL', { period1, return: "object" }); I was also considering merging into a single array too, and maybe we can indeed have an option for that.
Thanks again for all your patience and efforts to get things moving on this again... owing to the |
Thanks for your work on this @gadicc. I transform both
Which I write to stdout as CSVs. I'm doing it this way so I can take advantage of many common command line tools (eg, Are there more users you can think of who might be able to provide feedback on whether you should build it or not? |
Oh yes, that's right, you did you say a 2D array. Ok, on the same page now. Yes, I agree, that's probably a less commonly used format, and I thank you for your consideration of the project maintainers :) Umm, I believe the only people interested in this are you, @PythonCreator27, @ZehCoque (hi from July! 😅) and now @felixsanz in #334 (intraday interval support). I'm happy this is still released as Particularly, {
"tradingPeriods": {
"pre": [
[
{
"timezone": "EST",
"start": 1637571600,
"end": 1637591400,
"gmtoffset": -18000
}
]
],
// ...
} So it's in a double array. We should try find an example of more than 1 so we know where the other entries go. (That's in the original response from Yahoo, we transform the dates of course). |
Thanks @gadicc! I'll update my client code to use the Re the However, an observation: The
Yet, also,
I'm not sure what all this means, but figured it'd be helpful to post the observation. |
Thanks, @huned, for your observations. Glad to have that recorded here. Ok sounds good, let's see what else comes up with some use 🙏 |
# [2.1.0](v2.0.1...v2.1.0) (2021-12-21) ### Bug Fixes * **chart:** more query tests, intervals, edge cases ([#336](#336)) ([6b95d7e](6b95d7e)) * **package:** have semantic-release recognize version branches ([a89d895](a89d895)) * **quote:** equity: allow underlyingSymbol. LDN.MI test ([#363](#363)) ([817410b](817410b)) ### Features * **chart:** { return: "array" } (default) + test fix ([#336](#336)) ([1ac66c3](1ac66c3)) * **chart:** initial release as "_chart" ([#239](#239), [#328](#328), [#334](#334)) ([92b90b1](92b90b1))
For those following, this came out (still as |
Thanks @gadicc 🥇 Been using it daily without problems. |
Ok, great! Thanks amazing news! And really helpful to know. Thanks for reporting back 🙏 |
Hey guys, I started following this closely now and I'm super interested in it as well, my main goal in the future is to be able to request historical data of multiple symbols in one call to avoid Unauthorized error/bans. I even contacted aforementioned @ZehCoque directly as we're both from the same country and have our own edge cases when it comes to Brazil's stock exchanges (.SA). We are working on similar projects and can benefit from combined knowledge. I've been delving into the code of this project for the past couple hours and I feel more confident now. I'm not well versed into TypeScript yet but I can help on whatever is needed. I actually never participated actively in the developing of a community library (lone wolf programmer), so this could be a great learning for me as well. |
So, I am getting a validation error with symbol NUBR33.SA, sometimes Yahoo have information, but sometimes, like now, they have no historical info, so I can, of course, skip validation or catch the error, but I just wanted to point that out if you decided to do something about it.
|
Hey guys, so, still talking about If I request a Now, if I request a |
If you change period1 as 1673533800:
versus period1 as 1673409759:
Not a problem with your library since it's the underlying API, but makes using the API "confusing". |
Following from #238, #239, #328. In particular:
and let's discuss any other feedback.
The text was updated successfully, but these errors were encountered: