Order Flow cycle

doubles
Hi team,

I am preparing "entry" order flow(9:20 straddle) for my developer team, can you please confirm if this makes sense:

(A) Place entry order (LMT) - https://kite.trade/docs/connect/v3/orders/#placing-orders
(1) If order id is not received—wait for 4 seconds and check the orderbook for the unique tag. If found, then order is placed - if not found, then (A) again.
(2) if order is received - wait for order update status from websocket.

(B) Once order status update event is triggered by websocket - check orderbook/position book for "status" and "filled quantity" based on unique tag.
(1) If status = Complete & filled quantity = "quantity of order placed" - place Stop Loss Limit order as per excel
(2) If status = Complete & filled quantity < "quantity of order placed" - place Stop Loss Limit order for the quantity executed successfully as per excel { Update SL-L orders quantity when order is completely filled }



  • SRIJAN
    Looks fine.

    Just one thing,if filled quantity is less than the quantity requested,i.e order is partially filled,the status will still be 'OPEN'.

    Only after the order is completely filled, status will change to 'COMPLETE'.
  • sujith
    Order id is present in the response of the place order request only. You can know more here.

    If the order status is complete then filled_quantiity == quantity, if order is partially filled then order status will be OPEN and not complete.
Sign In or Register to comment.