GTT Order - directly

damok
Hi from python client placing the new Order

possible to Place new buy Order directly as GTT order as first buy (kiteconnect.place_gtt) ?
or i have to plate the normal then i have to update as GDT order ?

I am trying kiteconnect.place_gtt but getting error as

File "C:\Python39\lib\site-packages\kiteconnect\connect.py", line 724, in place_gtt
return self._post("gtt.place", params={
File "C:\Python39\lib\site-packages\kiteconnect\connect.py", line 840, in _post
return self._request(route, "POST", url_args=url_args, params=params, is_json=is_json, query_params=query_params)
File "C:\Python39\lib\site-packages\kiteconnect\connect.py", line 912, in _request
raise exp(data["message"], code=r.status_code)
kiteconnect.exceptions.InputException: Invalid order params.


My params
[{'exchange': 'NSE', 'tradingsymbol': 13243650, 'transaction_type': 'BUY', 'quantity': 25, 'order_type': 'MARKET', 'product': 'MIS', 'price': 168}]

kiteconnect.place_gtt(
trigger_type=kiteconnect.GTT_TYPE_SINGLE,
tradingsymbol=tradeSymbol,
exchange="NSE",
trigger_values=[176],
last_price=187,
orders=order_request)

where is the problem

and here

trigger value means where I have to buy ? but i wanted to buy on market then how to give the value please give your suggestions
  • SRIJAN
    SRIJAN edited August 2022
    Read the documentation properly .
    https://kite.trade/docs/connect/v3/orders/

    You are using incorrect values for exchange and tradingsymbol.
    Tradingsymbol and instrument tokens are different things.
    Also,why are you sending price in the order when you are placing market order??

    Trigger values mean at what price your order should be triggered,i.e,sent to the exchange.
    You can send a market/limit order, whatever you want.


    PS- Don't write in a hurry from next time ! :D :D
    How would anyone tell you how to 'plate' a 'GDT' order?? :p :p
  • rakeshr
    possible to Place new buy Order directly as GTT order as first buy (kiteconnect.place_gtt) ?
    Yes, you can place a GTT order. Based on triggers, these are placed as a normal order.
    kiteconnect.exceptions.InputException: Invalid order params.
    'tradingsymbol': 13243650
    You are using the wrong trading symbol. You can fetch complete instrument detail from the instrument list.
    trigger value means where I have to buy ? but i wanted to buy on market then how to give the value please give your suggestions
    Go through this article.
  • damok
    damok edited August 2022
    Thank you SRIJAN and rakeshr
This discussion has been closed.