ModifyBObridge SL

madhukar
@HowUTrade
To exit BObridge I need to pass childorderid, but childorderids is a string of two long numbers saperated by comma, I guess first is for target and second for SL , so which one to pass?

Same for modifyBObridge , do I need to saperate childorderids using split string? And then pass separately to modify SL or Tgt?

How do I know the second id in string is always for SL?
@Kailash @Nikhil.A @sujith
  • HowUTrade
    @madhukar

    To exit a BO/CO order,
    Just pass whatever returned from GetChildOrders to ExitBO/ExitCO/ExitBOBridge/ExitCOBridge functions. You no need to parse the child orders.

    To Modify a BO Target/Stoploss order:

    1. Call GetChildOrders, which will return all child orders (TGT & SL) as csv
    2. Split the childorders by comma --> ChildOrders Array
    3. Loop through the ChildOrders array and check for ordertype using GetOrderType(ChildOrder).
    If the OrderType is LIMIT, then it is a Target Order, Call ModifyBOTgt to modify the target price
    If the OrderType is SL, then it is a Stoploss Order, Call ModifyBOSl to modify the stoploss price.

    Pls note, there is no specified sequence for target & stoploss order id in ChildOrders.

    Pls refer this link for more details
    https://upstox.com/forum/post/5657
Sign In or Register to comment.