Google Intraday is not working

#21
is it still working, as it is an old one, when google was providing intra data.
being a non techie, unable to check it, but like to know
please look at the following comment at the page "

quote
nebaz commented on Aug 3
Yes, Google has bloked this api. Do you know any similar online api?
unquote

on the same page come down to

quote
kongaraman commented on Aug 6
same for me as well, but i found below yahoo link working for 1minute
https://query1.finance.yahoo.com/v7/finance/chart/RADICO.NS?&interval=1m
needs to convert to python code, can some one help to get datetime, open, high, low,close,vol values from this
unquote

based on above url of yahoo , I have created this. The output is JSON file ,which can either be converted to CSV through some online app or you can do your own coding. I did my own coding to extract data.

I am not a professional trader thus i don't know exact requirement of you people , I can help you edit as per your requirement to provide data from yahoo and updated file can be uploaded here for benefit of all.
 
#22
Thanks bro,
Normally, we want data in this order

scrip name, date (as yyyymmdd or any other format will do), time (hhmmss), open, high, low, close, volume
 
#25
Thanks bro,
Normally, we want data in this order

scrip name, date (as yyyymmdd or any other format will do), time (hhmmss), open, high, low, close, volume

edited link is https://drive.google.com/file/d/1u9Wd-S8pqHn6NQ5V7Ft49qPcnHQt3hEB/view?usp=sharing

(please note above link is different )

format is

scrip name,yyyymmdd,hhmmss,open,high,low,close,volume

when you open csv in excel leading '0' in time like 091500 is visible as 91500, however, in text mode it is correctly set.

please check at your end . Any more changes required ?
 
Last edited:
#26
is it still working, as it is an old one, when google was providing intra data.
being a non techie, unable to check it, but like to know
Hi,

There are other codes in the link that works. The mail code doesn't work or needs some changes.
Try below code to get one minute data of yahoo (Use it only for eduacational purpose)
Whereever you see SBIN you can enter the stock you want.
NS stands for NSE
BO stands fro BSE
You can play with range and interval.
You will have to use indentations properly. Have attached screen shot for your reference
Capture2.JPG
Capture2.JPG

Enjoy.
Do let me know if you need help.
#########################################
import requests
import pandas as pd
import arrow
import datetime


def get_quote_data(symbol='SBIN.NS', data_range='1d', data_interval='5m'):
res = requests.get(
'https://query1.finance.yahoo.com/v8/finance/chart/{symbol}?range={data_range}&interval={data_interval}'.format(
**locals()))
data = res.json()
body = data['chart']['result'][0]
dt = datetime.datetime
dt = pd.Series(map(lambda x: arrow.get(x).to('Asia/Calcutta').datetime.replace(tzinfo=None), body['timestamp']),
name='Datetime')
df = pd.DataFrame(body['indicators']['quote'][0], index=dt)
dg = pd.DataFrame(body['timestamp'])
df = df.loc[:, ('open', 'high', 'low', 'close', 'volume')]
df.dropna(inplace=True) # removing NaN rows
df.columns = ['OPEN', 'HIGH', 'LOW', 'CLOSE', 'VOLUME'] # Renaming columns in pandas

return df


data = get_quote_data('SBIN.NS', '1d', '1m')
print(data)

######################################################################
 
#27
@vickymadhav
Many thanks bro, for explaining codes etc.
But my problem is, I am a non techie and do not understand all this coding (even the basics) and how to use it,
 
#28
Say I am getting data in following style (as in attached file), but it cant be used for any purpose, unless it is in a tabular form
 

Attachments

#29
edited link is https://drive.google.com/file/d/1u9Wd-S8pqHn6NQ5V7Ft49qPcnHQt3hEB/view?usp=sharing

(please note above link is different )

format is

scrip name,yyyymmdd,hhmmss,open,high,low,close,volume

when you open csv in excel leading '0' in time like 091500 is visible as 91500, however, in text mode it is correctly set.

please check at your end . Any more changes required ?
IT'S NOT WORKING ,MEANS "runtime error9" subscript out of range"
please rectify or provide new link

Thanks
 
#30
Hi,

There are other codes in the link that works. The mail code doesn't work or needs some changes.
Try below code to get one minute data of yahoo (Use it only for eduacational purpose)
Whereever you see SBIN you can enter the stock you want.
NS stands for NSE
BO stands fro BSE
You can play with range and interval.
You will have to use indentations properly. Have attached screen shot for your reference View attachment 31009 View attachment 31009
Enjoy.
Do let me know if you need help.
#########################################
import requests
import pandas as pd
import arrow
import datetime


def get_quote_data(symbol='SBIN.NS', data_range='1d', data_interval='5m'):
res = requests.get(
'https://query1.finance.yahoo.com/v8/finance/chart/{symbol}?range={data_range}&interval={data_interval}'.format(
**locals()))
data = res.json()
body = data['chart']['result'][0]
dt = datetime.datetime
dt = pd.Series(map(lambda x: arrow.get(x).to('Asia/Calcutta').datetime.replace(tzinfo=None), body['timestamp']),
name='Datetime')
df = pd.DataFrame(body['indicators']['quote'][0], index=dt)
dg = pd.DataFrame(body['timestamp'])
df = df.loc[:, ('open', 'high', 'low', 'close', 'volume')]
df.dropna(inplace=True) # removing NaN rows
df.columns = ['OPEN', 'HIGH', 'LOW', 'CLOSE', 'VOLUME'] # Renaming columns in pandas

return df


data = get_quote_data('SBIN.NS', '1d', '1m')
print(data)

######################################################################

please make simple exe base utility with above code, so that everyone get benefit..

Thanks & Regards
 

Similar threads