Unable to Place GTT orders

Gafoor
HI,

I am trying to use GTT orders but getting error.
kite.get_gtts()


'KiteConnect' object has no attribute 'get_gtts'
  • sujith
    Can you private message your api_key? We will check and get back to you.
  • Gafoor
    Hi @sujith

    I am trying to place GTT order

    trigger_type = kite.GTT_TYPE_OCO
    tradingsymbol = "IDEA"
    exchange = "NSE"
    trigger_values = [3, 6]
    trading_instrument = exchange + ":" + tradingsymbol
    price_dict = kite.ltp(trading_instrument)
    price = price_dict[trading_instrument]["last_price"]
    order_dict = {"transaction_type": "SELL" , "quantity": 1}
    kite.place_gtt(trigger_type = trigger_type, tradingsymbol = tradingsymbol, exchange = exchange, trigger_values =trigger_values, last_price=price, orders=order_dict)

    this code is giving me :-
    InputException: `quantity` missing inside orders


  • sujith
    If you are placing two triggers then you need to have two orders on the list.
    You can check out the documentation here.
Sign In or Register to comment.