After creating a bracket IOC order (which gets immediately completed), I receive the postback for parent order but not for the child orders that are created. This seems to be a new thing.
I am quite sure there is nothing wrong with my code. I have checked that child order are indeed created by logging in Kite Portal.
Note that all other postbacks are fine (e.g. cancellation or order, creation etc.) Also, if I immediately modify stoploss of child order of a Bracket Order (instantly after order creation) I never used to get postback for the modification, but i had ignored this earlier thinking that perhaps the system has some rate limit on postbacks or something like that. Can you please also look into this?
1. bracket order placed and was checked to be complete. received postback for (creation of) parent order.. 2. two child orders were automatically created since it was a bracket order (i checked this on kite.zerodha.com) but no postback received for creation of child orders. So unless i fetch orders manually i wouldnt know anything about the child orders. 3. entire bracket order exited (by web portal). postback received properly.
the log had only orders received by postback. I deleted it. but i can recreate it if needed.
@amit123, You won't receive postbacks for open orders. The postbacks are pushed only when there is partial execution or complete execution or when there is a status change for trigger-based orders.
I see. thanks for the clarification. Perhaps I used to get postback before only after modifying the stoploss values.
But this is a problem because I need the child order ids in order to modify stoploss or target of a bracket order (or am I missing something?) It means I cannot only rely on postback. I have to manually fetch orders to get child order details after every bracket order.
please let me know if there is a way of dealing with bracket orders and modification without manually fetching them.
If you have a log of postbacks can you post here?
1. bracket order placed and was checked to be complete. received postback for (creation of) parent order..
2. two child orders were automatically created since it was a bracket order (i checked this on kite.zerodha.com) but no postback received for creation of child orders. So unless i fetch orders manually i wouldnt know anything about the child orders.
3. entire bracket order exited (by web portal). postback received properly.
the log had only orders received by postback. I deleted it. but i can recreate it if needed.
You won't receive postbacks for open orders. The postbacks are pushed only when there is partial execution or complete execution or when there is a status change for trigger-based orders.
But this is a problem because I need the child order ids in order to modify stoploss or target of a bracket order (or am I missing something?) It means I cannot only rely on postback. I have to manually fetch orders to get child order details after every bracket order.
please let me know if there is a way of dealing with bracket orders and modification without manually fetching them.
You need to fetch orderbook and check for the same.
As the bracket order is currently blocked, I am stuck in writing the code. It will be good if you can help me with the example