Google Finance Intraday data not getting downloaded!!

raindrops

Well-Known Member
Here is code snippet in Python for getting 1minute data for 1 day.

get_quote_data(symbol='SBIN.NS', data_range='1d', data_interval='1m'):
res = requests.get('https://query1.finance.yahoo.com/v8/finance/chart/{symbol}?range={data_range}&interval={data_interval}'.format(**locals()))
data = res.json()
copy paste this in browser
https://query1.finance.yahoo.com/v8/finance/chart/{SBIN.NS}?range={1d}&interval={1M}'.f
ormat(**locals()))data = res.json()

something wrong. getting this message - json is not supported
{"chart":{"result":null,"error":{"code":"Bad Request","description":"Invalid input - interval={1M}'.format(**locals()))data = res.json() is not supported. Valid intervals: [1m, 2m, 5m, 15m, 30m, 60m, 90m, 1h, 1d, 5d, 1wk, 1mo, 3mo]"}}}

can you please post the sample url exactly as needed to get json in browser
 

raindrops

Well-Known Member
Values of the parameters are given from code itself and when above code snippet gets executed it's giving me required results.
correct.
whether parameter values are inserted from python code or manually, the final url is the same.
internet protocol through python or browser is the same.
if the url is known then it can be used from Excel directly.
 
correct.
whether parameter values are inserted from python code or manually, the final url is the same.
internet protocol through python or browser is the same.
if the url is known then it can be used from Excel directly.
Here is code snippet in Python for getting 1minute data for 1 day.

get_quote_data(symbol='SBIN.NS', data_range='1d', data_interval='1m'):
res = requests.get('https://query1.finance.yahoo.com/v8/finance/chart/{symbol}?range={data_range}&interval={data_interval}'.format(**locals()))
data = res.json()
can you please give one sample final URL that is formed after parameters subsitution...let's say a 15 min example
 
Sirs,

Based on the information provided above . I have made a small executable.
Please find https://drive.google.com/file/d/1hXEN7SvyhGEALsuZtL5SaPxTcHtucEeh/view?usp=sharing

file name : Yahoo_download.exe
Time interval : 15 min
Period = 15 days
Format of output Data : CSV
Source of Data : yahoo
Batch Download : Not Available , one file at a time

In case you have specific requirement , I can change Time interval , period , format of data.
 

Similar threads