i try to collect 5 min historical data, but following error appears

medhavale
file name: Ti

from kiteconnect import KiteConnect

api_key ='XXXXXXXXX'
api_secret='XXXXXXXXX'
#request_token ='XXXXXXXXXXX'
access_token = 'XXXXXXXXX'
kite = KiteConnect(api_key=api_key)

kite.set_access_token(access_token)

print('Login successful')

-----------------------------------------------

import Ti
import pandas as pd
import datetime
import pdb

kite = Ti.kite

data = kite.historical_data(name=stock_name,exchange='NSE', interval='5minute',oi=True)


following error apears:
File "C:\Users\1\Desktop\API\RSI.py", line 20
data = kite.historical_data(name=stock_name,exchange='NSE', interval='5minute',oi=True)
IndentationError: unexpected indent


kindly help me to get out from this
  • rakeshr
    IndentationError: unexpected indent
    This error is from your local code environment and is not related to the kiteconnect APIs. For assistance on resolving unexpected indent issues in Python, please refer to this thread
Sign In or Register to comment.