GTT Triggered but no order placed

balajmrb
balajmrb edited November 2021 in Python client
Hi,

i am using place_gtt (and also modify_gtt) in my code. Both work fine and i can see them under Active GTTs.

However when the price hits the trigger, the GTT is triggered but no orders are placed.

On the other hand if i go to positions, click on the 3 dots and click on create GTT this works properly (places orders) when the price is hit. please help me here.

Below are the codes i am using. I dont think there are any errors in the code as they get placed properly. the problem is when GTT is triggered but no orders placed:

kite.place_gtt(
exchange=kite.EXCHANGE_NFO, tradingsymbol=pos_symbol,trigger_type =kite.GTT_TYPE_OCO,trigger_values=[pos_ltp-15, pos_ltp+15], last_price=pos_ltp,
orders=[
{ "exchange=kite":"EXCHANGE_NFO","tradingsymbol":pos_symbol,"transaction_type": "SELL", "quantity": pos_quantity, "order_type": "LIMIT","product": "NRML","price":pos_ltp-15},
{ "exchange=kite":"EXCHANGE_NFO","tradingsymbol":pos_symbol,"transaction_type": "SELL", "quantity": pos_quantity, "order_type": "LIMIT","product": "NRML","price":pos_ltp+15}])


kite.modify_gtt(trigger_id=gtt_id, tradingsymbol=pos_symbol, trigger_type =kite.GTT_TYPE_OCO, exchange=kite.EXCHANGE_NFO, trigger_values=[sl, tp], last_price=ltp,
orders=[
{ "exchange=kite":"EXCHANGE_NFO","tradingsymbol":pos_symbol,"transaction_type": "SELL", "quantity": pos_quantity, "order_type": "Market","product": "NRML","price":sl},
{ "exchange=kite":"EXCHANGE_NFO","tradingsymbol":pos_symbol,"transaction_type": "SELL", "quantity": pos_quantity, "order_type": "Market","product": "NRML","price":tp}])

  • sujith
    @balajmrb,
    You can go to kite web or app and check the gtt details screen or bottom sheet to know why order is not placed.
  • sujith
    Or you can know the reason in the get GTT response.

    You need to look at order[].result.order_result
    You can check the structure here.
Sign In or Register to comment.