Bracket order example

durghy_trades
Can someone please guide me with the parameters required for a bracket order? I cannot see the option of target_price in the inputs

Also, is there a way to check if the order has been squared off before sending an exit order?
  • tahseen
    You are talking about parameter name squareoff, where you place target_price

    And what do you mean by sending exit order ?
  • durghy_trades
    Thanks @tahseen

    By sending an exit order I mean the following,

    Event 1: I place a bracket order at market price (Rs. 100) with the stop loss (Rs. 90) and square-off price (Rs. 110).

    Event 2: I check if the stock has fulfilled my exit criteria (example: hitting the overbought RSI from above). At this point, the ltp is 108 but there might be 2 cases, either the stock did not hit 110 and is still available to exit or it hit the square-off price and the position is no longer available to exit.

    How do I check this? Thanks in advance
  • tahseen
    @durghy_trades
    1. When you place the order, the function returns order id
    2. Kite has on_update call back, which tells you order executed or not and how much filled
    3. Also the same on_update call back will tell you if the order id is executed target or sl fully / partially

    So once you have placed the order, use on_update to get this information to decide above
  • durghy_trades
    durghy_trades edited August 2021
    Thanks a lot @tahseen

    That was of great help!

    Edit: I do not find on_update call in the python package. Can you kindly reconfirm?
  • tahseen
    Sorry, It is on_order_update
Sign In or Register to comment.