joshuaulrich / quantmod

Quantitative Financial Modelling Framework
http://www.quantmod.com/
GNU General Public License v3.0
814 stars 224 forks source link

getSymbols yahoo v8 hour/minute resolution data #351

Closed IanWorthington closed 1 year ago

IanWorthington commented 2 years ago

Has anyone considered modifying getSymbols.yahoo to access the 1 hour and 1 minute data provided by the v8 chart api, eg:

https://query1.finance.yahoo.com/v8/finance/chart/TSLA?interval=1m&interval=max

iiuc data history is limited but it would still be useful to have access to it.

ethanbsmith commented 2 years ago

interesting. this looks similar to the older yahoo api. it might have some advantages:

  1. seems to support daily data
  2. doesn't seem to need the crumb cruft
  3. can bring in splits and divies in a single call alongside with OHLCVA

that said, i wonder if the data under the hood is any better. is it worth putting effort into this?

https://query1.finance.yahoo.com/v8/finance/chart/TSLA?symbol=TSLA&period1=1330326000&period2=1639776168&useYfid=true&interval=1d&includePrePost=true&events=div%7Csplit%7Cearn

IanWorthington commented 2 years ago

I'm certainly keen on getting access to finer resolution data.

What's the crumb cruft?

kapsner commented 1 year ago

As this issue seemed to be yet unsolved, I've implemented the feature to query minute-resolution intraday data from yahoo api for the last 7 days (allowed maximum) (see PR #381 ).

This can be tested with

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

Does this meet your requirements, @IanWorthington ?

IanWorthington commented 1 year ago

As this issue seemed to be yet unsolved, I've implemented the feature to query minute-resolution intraday data from yahoo api for the last 7 days (allowed maximum) (see PR #381 ).

This can be tested with

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

Does this meet your requirements, @IanWorthington ?

I shall take a look at it! Many thanks!