Bulk fetch OHLC + LTP quotes for up to 200 instruments-Zerodha-KiteConne...



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'])