instrument list problem

Balaganga
from kiteconnect import KiteConnect
key="xxxxxxxxxxxxxx"
secret="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
kite=KiteConnect(api_key=key)
access_token=open("access_token.txt","r").read()
kite.set_access_token(access_token)
inst=kite.instruments("NSE")
print(inst)

in output:
Traceback (most recent call last):
File "C:\Users\Saravanan\Desktop\fifth.py", line 10, in
inst=kite.instruments("NSE")
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Saravanan\AppData\Local\Programs\Python\Python312\Lib\site-packages\kiteconnect\connect.py", line 566, in instruments
return self._parse_instruments(self._get("market.instruments", url_args={"exchange": exchange}))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Saravanan\AppData\Local\Programs\Python\Python312\Lib\site-packages\kiteconnect\connect.py", line 861, in _get
return self._request(route, "GET", url_args=url_args, params=params, is_json=is_json)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

it show the line
inst=kite.instruments("NSE")
as error line.

Any Solution please.



Sign In or Register to comment.