Unhandled Error Traceback (most recent call last): File "/opt/anaconda3/lib/python3.8/site-packages/twisted/python/log.py", line 101, in callWithLogger return callWithContext({"system": lp}, func, *args, **kw) File "/opt/anaconda3/lib/python3.8/site-packages/twisted/python/log.py", line 85, in callWithContext return context.call({ILogContext: newCtx}, func, *args, **kw) File "/opt/anaconda3/lib/python3.8/site-packages/twisted/python/context.py", line 118, in callWithContext return self.currentContext().callWithContext(ctx, func, *args, **kw) File "/opt/anaconda3/lib/python3.8/site-packages/twisted/python/context.py", line 83, in callWithContext return func(*args, **kw) --- --- File "/opt/anaconda3/lib/python3.8/site-packages/twisted/internet/selectreactor.py", line 149, in _doReadOrWrite why = getattr(selectable, method)() File "/opt/anaconda3/lib/python3.8/site-packages/twisted/internet/tcp.py", line 246, in doRead return self._dataReceived(data) File "/opt/anaconda3/lib/python3.8/site-packages/twisted/internet/tcp.py", line 251, in _dataReceived rval = self.protocol.dataReceived(data) File "/opt/anaconda3/lib/python3.8/site-packages/twisted/protocols/tls.py", line 324, in dataReceived self._flushReceiveBIO() File "/opt/anaconda3/lib/python3.8/site-packages/twisted/protocols/tls.py", line 290, in _flushReceiveBIO ProtocolWrapper.dataReceived(self, bytes) File "/opt/anaconda3/lib/python3.8/site-packages/twisted/protocols/policies.py", line 107, in dataReceived self.wrappedProtocol.dataReceived(data) File "/opt/anaconda3/lib/python3.8/site-packages/autobahn/twisted/websocket.py", line 291, in dataReceived self._dataReceived(data) File "/opt/anaconda3/lib/python3.8/site-packages/autobahn/websocket/protocol.py", line 1213, in _dataReceived self.consumeData() File "/opt/anaconda3/lib/python3.8/site-packages/autobahn/websocket/protocol.py", line 1225, in consumeData while self.processData() and self.state != WebSocketProtocol.STATE_CLOSED: File "/opt/anaconda3/lib/python3.8/site-packages/autobahn/websocket/protocol.py", line 1591, in processData fr = self.onFrameEnd() File "/opt/anaconda3/lib/python3.8/site-packages/autobahn/websocket/protocol.py", line 1713, in onFrameEnd self._onMessageEnd() File "/opt/anaconda3/lib/python3.8/site-packages/autobahn/twisted/websocket.py", line 319, in _onMessageEnd self.onMessageEnd() File "/opt/anaconda3/lib/python3.8/site-packages/autobahn/websocket/protocol.py", line 634, in onMessageEnd self._onMessage(payload, self.message_is_binary) File "/opt/anaconda3/lib/python3.8/site-packages/autobahn/twisted/websocket.py", line 322, in _onMessage self.onMessage(payload, isBinary) File "/opt/anaconda3/lib/python3.8/site-packages/kiteconnect/ticker.py", line 71, in onMessage self.factory.on_message(self, payload, is_binary) File "/opt/anaconda3/lib/python3.8/site-packages/kiteconnect/ticker.py", line 670, in _on_message self.on_ticks(self, self._parse_binary(payload)) File "/Users/basu/Desktop/Mixed.py", line 138, in on_ticks kite.place_order(tradingsymbol=name, price=sell_price, variety=kite.VARIETY_REGULAR, exchange=kite.EXCHANGE_NFO, transaction_type=kite.TRANSACTION_TYPE_SELL, quantity=quant, order_type=kite.ORDER_TYPE_MARKET, product=kite.PRODUCT_MIS) File "/opt/anaconda3/lib/python3.8/site-packages/kiteconnect/connect.py", line 354, in place_order return self._post("order.place", File "/opt/anaconda3/lib/python3.8/site-packages/kiteconnect/connect.py", line 840, in _post return self._request(route, "POST", url_args=url_args, params=params, is_json=is_json, query_params=query_params) File "/opt/anaconda3/lib/python3.8/site-packages/kiteconnect/connect.py", line 912, in _request raise exp(data["message"], code=r.status_code) kiteconnect.exceptions.InputException: `quantity` should be multiple of 75.
But, it's okay, as the issue is now resolved. NIFTY only monthly expiring options have 50 quantity per lot, not the weekly ones for July, so was getting the error - [kiteconnect.exceptions.InputException: `quantity` should be multiple of 75.]
Make sure to remove app and client-specific information.
Traceback (most recent call last):
File "/opt/anaconda3/lib/python3.8/site-packages/twisted/python/log.py", line 101, in callWithLogger
return callWithContext({"system": lp}, func, *args, **kw)
File "/opt/anaconda3/lib/python3.8/site-packages/twisted/python/log.py", line 85, in callWithContext
return context.call({ILogContext: newCtx}, func, *args, **kw)
File "/opt/anaconda3/lib/python3.8/site-packages/twisted/python/context.py", line 118, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/opt/anaconda3/lib/python3.8/site-packages/twisted/python/context.py", line 83, in callWithContext
return func(*args, **kw)
--- ---
File "/opt/anaconda3/lib/python3.8/site-packages/twisted/internet/selectreactor.py", line 149, in _doReadOrWrite
why = getattr(selectable, method)()
File "/opt/anaconda3/lib/python3.8/site-packages/twisted/internet/tcp.py", line 246, in doRead
return self._dataReceived(data)
File "/opt/anaconda3/lib/python3.8/site-packages/twisted/internet/tcp.py", line 251, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/opt/anaconda3/lib/python3.8/site-packages/twisted/protocols/tls.py", line 324, in dataReceived
self._flushReceiveBIO()
File "/opt/anaconda3/lib/python3.8/site-packages/twisted/protocols/tls.py", line 290, in _flushReceiveBIO
ProtocolWrapper.dataReceived(self, bytes)
File "/opt/anaconda3/lib/python3.8/site-packages/twisted/protocols/policies.py", line 107, in dataReceived
self.wrappedProtocol.dataReceived(data)
File "/opt/anaconda3/lib/python3.8/site-packages/autobahn/twisted/websocket.py", line 291, in dataReceived
self._dataReceived(data)
File "/opt/anaconda3/lib/python3.8/site-packages/autobahn/websocket/protocol.py", line 1213, in _dataReceived
self.consumeData()
File "/opt/anaconda3/lib/python3.8/site-packages/autobahn/websocket/protocol.py", line 1225, in consumeData
while self.processData() and self.state != WebSocketProtocol.STATE_CLOSED:
File "/opt/anaconda3/lib/python3.8/site-packages/autobahn/websocket/protocol.py", line 1591, in processData
fr = self.onFrameEnd()
File "/opt/anaconda3/lib/python3.8/site-packages/autobahn/websocket/protocol.py", line 1713, in onFrameEnd
self._onMessageEnd()
File "/opt/anaconda3/lib/python3.8/site-packages/autobahn/twisted/websocket.py", line 319, in _onMessageEnd
self.onMessageEnd()
File "/opt/anaconda3/lib/python3.8/site-packages/autobahn/websocket/protocol.py", line 634, in onMessageEnd
self._onMessage(payload, self.message_is_binary)
File "/opt/anaconda3/lib/python3.8/site-packages/autobahn/twisted/websocket.py", line 322, in _onMessage
self.onMessage(payload, isBinary)
File "/opt/anaconda3/lib/python3.8/site-packages/kiteconnect/ticker.py", line 71, in onMessage
self.factory.on_message(self, payload, is_binary)
File "/opt/anaconda3/lib/python3.8/site-packages/kiteconnect/ticker.py", line 670, in _on_message
self.on_ticks(self, self._parse_binary(payload))
File "/Users/basu/Desktop/Mixed.py", line 138, in on_ticks
kite.place_order(tradingsymbol=name, price=sell_price, variety=kite.VARIETY_REGULAR, exchange=kite.EXCHANGE_NFO, transaction_type=kite.TRANSACTION_TYPE_SELL, quantity=quant, order_type=kite.ORDER_TYPE_MARKET, product=kite.PRODUCT_MIS)
File "/opt/anaconda3/lib/python3.8/site-packages/kiteconnect/connect.py", line 354, in place_order
return self._post("order.place",
File "/opt/anaconda3/lib/python3.8/site-packages/kiteconnect/connect.py", line 840, in _post
return self._request(route, "POST", url_args=url_args, params=params, is_json=is_json, query_params=query_params)
File "/opt/anaconda3/lib/python3.8/site-packages/kiteconnect/connect.py", line 912, in _request
raise exp(data["message"], code=r.status_code)
kiteconnect.exceptions.InputException: `quantity` should be multiple of 75.
But, it's okay, as the issue is now resolved. NIFTY only monthly expiring options have 50 quantity per lot, not the weekly ones for July, so was getting the error - [kiteconnect.exceptions.InputException: `quantity` should be multiple of 75.]
Thank You.