Unable to place GTT order

Ajan
Hi all, i am trying to place the below single leg GTT order but getting `quantity` missing inside orders error. below is the code
order_dic={"transaction_type":kite.TRANSACTION_TYPE_BUY,
"quantity":25,
"order_type":kite.ORDER_TYPE_SL,
"product":kite.PRODUCT_NRML,
"price":600}

kite.place_gtt(trigger_type=kite.GTT_TYPE_SINGLE,
tradingsymbol='BANKNIFTY2160335700CE',
exchange=kite.EXCHANGE_NFO,
trigger_values=[587.4],
last_price=170,
orders=order_dic
)
Please help me what i am missing?
Tagged:
  • rakeshr
    "order_type":kite.ORDER_TYPE_SL,
    For GTT orders, you can only use LIMIT order type. You can go through all request attributes detail here.
  • Ajan
    Hi Rakesh i tried that.. still getting InputException: `quantity` missing inside orders
  • sujith
    @Ajan,
    You need to send an array of orders. You can check out all the param details on the documentation.
  • Ajan
    pls check my code i have declared it in array only.. it doesnt work. you can try the same code in your system
  • rakeshr
    pls check my code i have declared it in array only
    No, you are passing as a dictionary. You need to pass it as a list of dictionary i.e array here, for example:
    order_dic=[
    {"transaction_type":kite.TRANSACTION_TYPE_BUY,
    "quantity":25,
    "order_type":kite.ORDER_TYPE_SL,
    "product":kite.PRODUCT_NRML,
    "price":600}
    ]
  • Ajan
    great.. rakeshr thank you very much. it worked.. that was really helpful
This discussion has been closed.