Closed satvikpendem closed 1 month ago
I was quite busy the last two weeks and will be for the next two, therefore I can't promise when I will be able to look into it, but it doesn't seem to be a big issue.
Sounds good, have a happy holidays!
I have analyzed the response of this query and unfortunately, the response is just such a tiny bit different (apparently only TradingPeriod
changes slightly) that the existing data structure could not be used.
There seems to be no simple way to adjust the data structure to accept both variants. Alternatively, we would need to duplicate almost the complete YResponse
structure, which isn't ideal either.
I think the best solution is probably to write a custom deserializer for TradingPeriod
to handle both cases.
Sounds good, would that be included in the crate itself? Would be a good feature to have.
Yes, of course, I would put it in the same crate.
I have just pushed and update, enabling optionally pre or post regular trading hours quotes. See the new example examples/get_quote_period_interval.rs
.
Have not done so far an extensive testing, please let me know if this solves your issue. I will than prepare a new release version.
Thanks, I'll take a look
Looks like you can get pre- and post-day trading data via the
curl
ing the URL below, specifically theincludePrePost
parameter with the value set totrue
. Could this be added as a parameter in the code as well? I am thinking in both the get quote range and the get latest quotes methods, if there could be a parameter to include pre- and post-day trading data.https://query1.finance.yahoo.com/v8/finance/chart/AAPL?interval=1m&period=1d&includePrePost=true
I found this out via the Python yfinance library which has this parameter.