GTT Order Tracking till completing the trade.

TheBull
hi,

i am struck with one question. when i am placing a buy order in options, after completing the order, i am placing a GTT order. but once the GTT is completed. it is placing either an SL order or Target order in the order book. i am not able to relate it to the original trade as i am not finding any relation b/w the GTT completed and the sl/target order placed. can you explain how we can get the link between the GTT and sl/ target order placed after gtt completes.
  • SRIJAN
    You have to save the gtt id and then use kite.get_gtt(gtt_id). Or you can use kite.get_gtts() to get all gtts .
  • TheBull
    hi @SRIJAN, thanks for the response, my question was after i get the complete status from GTT and the SL or targets placed. linking b/w these two.
  • SRIJAN
    Yeah, that's what I told. Right??
  • pranavwagh
    pranavwagh edited February 2022
    @SRIJAN .. I think he means that after gtt is executed, and any order is placed, how can he link back the placed order to the gtt.

    @TheBull .. not sure if there is an exact way to to do what you want, however if you see gtt structure, it has the order array, one of those orders would be placed after execution of gtt, so.. actually you know the orders even before they execute. In the same structure you will also find gtt_id.. so, I think if you perist this info somewhere, you should be good to go

  • SRIJAN
    There is no way to relate the gtt and the orders placed from that gtt. Gtt just places a order when trigger is hit,nothing else.
Sign In or Register to comment.