quantmod icon indicating copy to clipboard operation
quantmod copied to clipboard

getSymbols yahoo v8 hour/minute resolution data

Open IanWorthington opened this issue 3 years ago • 2 comments

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.

IanWorthington avatar Dec 17 '21 03:12 IanWorthington

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

ethanbsmith avatar Dec 17 '21 21:12 ethanbsmith

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

What's the crumb cruft?

IanWorthington avatar Dec 18 '21 02:12 IanWorthington

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 ?

kapsner avatar Apr 18 '23 07:04 kapsner

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!

IanWorthington avatar Apr 18 '23 13:04 IanWorthington