cancelled orders coming twice via websocket

visasimbu
I have written basic copy trading. Hence from parent websocket of order_update were used. I have observed that when i cancel the order in parent account it triggers two cancellation orders with difference of below fields. Please help me to understand what those are. How can I classify which cancel order was orginal , completion of cancellation order and partial cancellation.

pending_quantity = 0
cancelled_quantity = 1
Tagged:
  • sujith
    These are because of multiple async signals from OMS vendor. You can know more about this here.
  • visasimbu
    @sujith Thanks for sharing thread. I have gone through it. What is the difference between binary market data and non binary market data in postback ?

    https://kite.trade/docs/connect/v3/websocket/#postbacks-and-non-binary-updates

    I am using binary market data i believe. Since i have connected funciton "on_order_update". The difference might help me to fix my issue.
  • visasimbu
    Is non binary will send back the exact order received by kite ?
  • visasimbu
    Also facing the issue on quantity. Lets say i am chunking bigger orders as per freezing limit of index. Hence for same position i was sending multiple orders. Is there any way to send as basket orders where in accept collection of orders. Send this orders as in one single basket in websocket ?

    Ex: I like to place 4000 nifty orders. It gets chunked into 3 orders 1800, 1800 and 400 orders as per Nifty freezing limit of 1800. In that case 3 different orders were sent. Based on these orders I have used multiplier to replicate these orders in child account where each order was considered as different entity it was increasing order qty. For this example 1800 * 0.5 (multiplier) then 900 qty as one order. Hence 3 orders with 900 , 900 and 200 was sent from child account where as this can be send as 1800 and 200.

    I just explored buffering of order. But that seems to be worst idea as price will keep change. Like to reduce the latency. So not interested on this solution.

    Please help me how to consolidate these orders in parent and child ?
  • sujith
    The binary data is the live market data like ltp, OHLC, etc.
    The non-binary data are the order updates, and other non live market data.

    Have you checked the iceberg order?
Sign In or Register to comment.