how to square off BO orders for multiple lots place order for 5 lot on ACC 1)trigger hit for 5 lots and target/stoploss rich by 3 lots, then how to square off 2 lots. 2)trigger hit for 3 lots and target/stoploss rich by 3 lots, then how to square off 2 lots.
kite.order_cancel(parent_order_id="") is not working for naturalgas16novfut, I had placed an CO on naturalgas, was not able to exit the order using the above statement, the error received was
@Pushwinder This is happens when order is already cancelled/exited and you are trying to cancel/exit it again. Can you please check in orderbook if the order is still pending before you try to cancel/exit? also for CO it s optional to send parent_order_id while exiting.
No sir, I have tried it a lot of times, The order which I am trying to cancel are present on the OPEN ORDERS list, I am able to place orders easily, but Exit using kite.order_cancel(order_id) is not working for me.
No sir, full exit, I am just a novice trader, started with kite APIs recently, and just trying out with single quantity in Naturalgas16novfut. I am able to place order but not able to exit it. I am using these formats, tell me if I am wrong kite.order_cancel(order_id="161115000491500") and kite.order_cancel(order_id="161115000491500",parent_order_id="161115000491499")
I have tried both these codes: kite.order_cancel(order_id="161115000491500") kite.order_cancel(order_id="161115000491500",parent_order_id="161115000491499")
but the error message i got is this: kiteconnect.exceptions.OrderException: The order couldn't be cancelled
whereas, this order was present in Open Orders List
Now the error I am getting is kiteconnect.exceptions.GeneralException: Route not found This is syntax i used: kite.order_cancel(order_id="161122000412518",variety="CO",parent_order_id="161122000412517")
In both the cases when you exit the BO order the remaining 2 lots will be squared off.
I had placed an CO on naturalgas, was not able to exit the order using the above statement, the error received was
TypeError: order_cancel() missing 1 required positional argument: 'order_id'
when I used the order_id, which is normally +1 the parent_order_id it showed,
kiteconnect.exceptions.OrderException: The order couldn't be cancelled
Try sending order_id and parent_id.
Note: partial exit of special orders(BO and CO) is not available.
kiteconnect.exceptions.OrderException: The order couldn't be cancelled
parent_order_id
while exiting.Are you trying to do partial exit?
I am using these formats, tell me if I am wrong
kite.order_cancel(order_id="161115000491500") and
kite.order_cancel(order_id="161115000491500",parent_order_id="161115000491499")
what client are you using java or python?
Can you paste your code for cancelling BO?
kite.order_cancel(order_id="161115000491500")
kite.order_cancel(order_id="161115000491500",parent_order_id="161115000491499")
but the error message i got is this:
kiteconnect.exceptions.OrderException: The order couldn't be cancelled
whereas, this order was present in Open Orders List
kite.order_cancel("161115000491500", variety="bo", parent_order_id="161115000491499")
kiteconnect.exceptions.GeneralException: Route not found
This is syntax i used:
kite.order_cancel(order_id="161122000412518",variety="CO",parent_order_id="161122000412517")
"regular", "bo", "co", "amo"
all in lowercase.