getting below error while placing gtt order , checked the instrument from the csv file , it seems fine .. onnect\connect.py", line 927, in _request raise exp(data["message"], code=r.status_code) kiteconnect.exceptions.InputException: Invalid instrument
PS: Make sure to remove app and client specific tokens.
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kite.trade:443
DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "POST /gtt/triggers HTTP/1.1" 400 91
this what i got after enabling logs ..
"logging.basicConfig(level=logging.DEBUG)"
Is there another way to enable more detailed logs ??
.\debugpy\launcher' '59713' '--' 'D:\Shares\Python\GUI_Start\New_22_Sep_23\GTT_Order_Failed..py'
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kite.trade:443
send: b'POST /gtt/triggers HTTP/1.1\r\nHost: api.kite.trade\r\nUser-Agent: Kiteconnect-python/4.2.0\r\nAccept-Encoding: gzip, deflate\r\nAccept: */*\r\nConnection: keep-alive\r\nX-Kite-Version: 3\r\nAuthorization: token knk9kc:eXn347Ab\r\nContent-Length: 661\r\nContent-Type: application/x-www-form-urlencoded\r\n\r\n'
send: b'condition=%7B%22exchange%22%3A+%22NSE%22%2C+%22tradingsymbol%22%3A+%22NIFTY23SEP19000PE%22%2C+%22trigger_values%22%3A+%5B4.5%2C+4.6%5D%2C+%22last_price%22%3A+4.4%7D&orders=%5B%7B%22exchange%22%3A+%22NSE%22%2C+%22tradingsymbol%22%3A+%22NIFTY23SEP19000PE%22%2C+%22transaction_type%22%3A+%22SELL%22%2C+%22quantity%22%3A+1%2C+%22order_type%22%3A+%22LIMIT%22%2C+%22product%22%3A+%22MIS%22%2C+%22price%22%3A+4.5%7D%2C+%7B%22exchange%22%3A+%22NSE%22%2C+%22tradingsymbol%22%3A+%22NIFTY23SEP19000PE%22%2C+%22transaction_type%22%3A+%22SELL%22%2C+%22quantity%22%3A+1%2C+%22order_type%22%3A+%22LIMIT%22%2C+%22product%22%3A+%22MIS%22%2C+%22price%22%3A+4.6%7D%5D&type=two-leg'
reply: 'HTTP/1.1 400 Bad Request\r\n'
header: Date: Fri, 22 Sep 2023 08:44:59 GMT
header: Content-Type: application/json
header: Content-Length: 91
header: Connection: keep-alive
header: CF-Cache-Status: DYNAMIC
header: Strict-Transport-Security: max-age=15552000; includeSubDomains
header: Set-Cookie: _cfuvid=UqKvZ1nfuTC78LlVIOkegldcb70XyfOcWfZQFBt_hC8-1695372299732-0-604800000; path=/; domain=.kite.trade; HttpOnly; Secure; SameSite=None
header: Server: cloudflare
header: CF-RAY: 80a944e8ca619ff1-SIN
header: alt-svc: h3=":443"; ma=86400
DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "POST /gtt/triggers HTTP/1.1" 400 91
An error occurred: Invalid instrument
PS \Shares\Python>
Also in the logs i see , even if i have mentioned exchange": "NFO in the request , while sending it to kite , somehow it changed to NSE ...
send: b'condition=%7B%22exchange%22%3A+%22NSE%22%2C+