It looks like you're new here. If you want to get involved, click one of these buttons!
from kiteconnect import KiteConnect
import os
import datetime as dt
import pandas as pd
cwd = os.chdir("C:/Users/hozef/OneDrive/Desktop/New Logic")
#generate trading session
access_token = open("access_token.txt",'r').read()
key_secret = open("api_key.txt",'r').read().split()
kite = KiteConnect(api_key=key_secret[0])
kite.set_access_token(access_token)
#get dump of all NSE instruments
instrument_dump = kite.instruments("NSE")
instrument_df = pd.DataFrame(instrument_dump)
instrument_df.to_csv("C:/Users/hozef/OneDrive/Desktop/New Logic/NSE_Instruments_31122019.csv",index=False)
Kite web and app uses formatted names to help users understand. You need to search with actual tradingsymbol in the instrument dump.
instrument_dump = kite.instruments("NFO")
instrument_df = pd.DataFrame(instrument_dump)