Skip to content
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

Feature: querying of minute-resolution intraday data with yahoo api #381

Merged
merged 2 commits into from
Jul 30, 2023

Conversation

kapsner
Copy link
Contributor

@kapsner kapsner commented Apr 17, 2023

Yahoo API allows to query intraday data for last 7 days. This PR implements querying of intraday data with yahoo API.

Addresses #351

Test with

remotes::install_github("kapsner/quantmod")
quantmod::getSymbols("AAPL", periodicity = "intraday")
quantmod::chartSeries(AAPL)

Rplot

@kapsner kapsner changed the title Feature: querying of intraday data for yahoo api Feature: querying of minute-resolution intraday data for yahoo api Apr 17, 2023
@kapsner kapsner changed the title Feature: querying of minute-resolution intraday data for yahoo api Feature: querying of minute-resolution intraday data with yahoo api Apr 17, 2023
@joshuaulrich
Copy link
Owner

Sorry it took me so long to reply. This looks really good!

The only potential change I can think of is that Yahoo supports more than 1-minute intraday data. The valid intraday values are: 1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h

It would be nice to support all of those. It doesn't have to be done in this PR though. I can do it after merging. What do you think? Also, do you know if you can get more history for the lower resolution intraday data?

@kapsner
Copy link
Contributor Author

kapsner commented May 19, 2023

Thanks @joshuaulrich for your feedback!

The only potential change I can think of is that Yahoo supports more than 1-minute intraday data. The valid intraday values are: 1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h

Ah cool, I wasn't aware of this. Yes, I agree with you that supporting all of those would be indeed nice. However, I am not familiar if one can get more history of the lower resolution intraday data. If this is the case, the "history cutoff"-logic would need to be adapted accordingly: https://github.com/joshuaulrich/quantmod/pull/381/files#diff-0d1f6c1913e17876f7f890fdb8db9d0109d6806720090032749c669bdeb27dfcR290

I have no preference regarding including the other intraday-resolution options into this PR or do it after merging - as you like!

@joshuaulrich joshuaulrich linked an issue Jul 30, 2023 that may be closed by this pull request
@joshuaulrich joshuaulrich merged commit d461fe0 into joshuaulrich:master Jul 30, 2023
@joshuaulrich joshuaulrich added this to the Release 0.4.25 milestone Jul 30, 2023
joshuaulrich added a commit that referenced this pull request Jul 31, 2023
The original implementation only exposed the 1-minute periodicity
value. This exposes all the other possible values Yahoo Finance makes
available.

See #351. See #381.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

getSymbols yahoo v8 hour/minute resolution data
2 participants