But am getting an error related to parent_order_id as below although I am expliciting passing it after retreiving the same from the orderbook:
Traceback (most recent call last): File "", line 3, in File "C:\Python27\lib\site-packages\kiteconnect\__init__.py", line 319, in order_modify "parent_order_id": parent_order_id File "C:\Python27\lib\site-packages\kiteconnect\__init__.py", line 472, in _put return self._request(route, "PUT", params) File "C:\Python27\lib\site-packages\kiteconnect\__init__.py", line 496, in _request uri = self._routes[route] KeyError: 'order_modify'
Also face the error when modifying a open bracket order (not yet executed) wherein I pass parent_order_id = None. But same error as above.
Looks like everytime I report something - it ends up in a new release - but glad to help @sujith ... Let me know once fixed so that I can try it out...
Traceback (most recent call last): File "", line 1, in File "C:\Python27\lib\site-packages\kiteconnect\__init__.py", line 344, in order_modify return self._put("orders.modify", params)["order_id"] File "C:\Python27\lib\site-packages\kiteconnect\__init__.py", line 585, in _put return self._request(route, "PUT", params) File "C:\Python27\lib\site-packages\kiteconnect\__init__.py", line 668, in _request raise(exp(data["message"], code=r.status_code)) kiteconnect.exceptions.OrderException: MSG_FAILURE
Hi @virtualKG, It seems like order_id param is wrong. You need to pass order_id in the order id field and not exchange_order_id. I think that should resolve the issue.
It seems to be a bug in pykiteconnect. We will fix it and update it soon.
We will fix it in a couple of days. We will let you know once it is done.
Looks like there is still some issue with the order modification function. Tried to executed the below code:
kite.order_modify(order_id = '1600000001840697', parent_order_id='171113000307966', exchange='NFO', tradingsymbol='DLF17NOVFUT', transaction_type='BUY', quantity=5000, price=201, order_type='LIMIT', product='BO', trigger_price=0, validity='DAY', disclosed_quantity=0, variety='bo')
Return is the below error message:
Traceback (most recent call last):
File "", line 1, in
File "C:\Python27\lib\site-packages\kiteconnect\__init__.py", line 344, in order_modify
return self._put("orders.modify", params)["order_id"]
File "C:\Python27\lib\site-packages\kiteconnect\__init__.py", line 585, in _put
return self._request(route, "PUT", params)
File "C:\Python27\lib\site-packages\kiteconnect\__init__.py", line 668, in _request
raise(exp(data["message"], code=r.status_code))
kiteconnect.exceptions.OrderException: MSG_FAILURE
Please assist.
It seems like order_id param is wrong.
You need to pass order_id in the order id field and not exchange_order_id.
I think that should resolve the issue.