import pandas as pd
import requests
r=requests.get('https://api.kite.trade/quote/ohlc?
api_key=xxx&access_token=yyy&i=NSE:INFY&i=BSE:SENSEX&i=NSE:NIFTY+50')
#if want in ltp format follow below:
#r=requests.get('https://api.kite.trade/quote/ltp?
api_key=xxx&access_token=yyy&i=NSE:INFY&i=BSE:SENSEX&i=NSE:NIFTY+50')
data=r.json()
data=pd.DataFrame(data['data']['BSE:SENSEX'])
print(data['ohlc']['close'])
import pandas as pd
import requests
r=requests.get('https://api.kite.trade/quote/ohlc?
api_key=xxx&access_token=yyy&i=NSE:INFY&i=BSE:SENSEX&i=NSE:NIFTY+50')
#if want in ltp format follow below:
#r=requests.get('https://api.kite.trade/quote/ltp?
api_key=xxx&access_token=yyy&i=NSE:INFY&i=BSE:SENSEX&i=NSE:NIFTY+50')
data=r.json()
data=pd.DataFrame(data['data']['BSE:SENSEX'])
print(data['ohlc']['close'])