How i create GTT with two leg ? i need to enter with LIMIT and need to Set SL & TP with GTT

CA1869
I Need a python code for to place an GTT with two leg orders
  • mangroliyahilesh
    Any update on this?
  • mangroliyahilesh
    order_dict = [{"transaction_type": kite.TRANSACTION_TYPE_SELL, "quantity": quantity,
    'order_type': kite.ORDER_TYPE_LIMIT, "product": kite.PRODUCT_NRML, "price": loss},
    {"transaction_type": kite.TRANSACTION_TYPE_SELL, "quantity": quantity,
    'order_type': kite.ORDER_TYPE_LIMIT, "product": kite.PRODUCT_NRML, "price": target}]
    gtt_order = kite.place_gtt(kite.GTT_TYPE_OCO, trading_symbol, kite.EXCHANGE_NFO, [loss, target], ltp, order_dict)


    I want to do for options, but it throws error.
  • rakeshr
    @mangroliyahilesh
    You are not sending the orders list properly. Go through the two-leg GTT python example here.
  • mangroliyahilesh
    @rakeshr I am able to place GTT order, now issue is it's not able to square off position at trigger price.
    I placed order for option buy and want to have square off that with sl and tp using get.

    Can you please help?
Sign In or Register to comment.