☰
Login
Signup
Home
›
Python client
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
13.9K
All Categories
0
Incidents
156
Node JS client
40
Go client
793
.Net API client
380
Kite Publisher
537
.Net / VBA / Excel (3rd party)
458
Algorithms and Strategies
999
Java client
1.1K
API clients
404
PHP client
4K
Python client
348
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
February 2021
Rajneesh_12
May 2020
Gafoor
February 2021
sujith
Unable to Place GTT orders
Gafoor
May 2020
in
Python client
HI,
I am trying to use GTT orders but getting error.
kite.get_gtts()
'KiteConnect' object has no attribute 'get_gtts'
Tagged:
#gtt #kite #python
sujith
May 2020
Can you private message your api_key? We will check and get back to you.
Gafoor
May 2020
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
May 2020
If you are placing two triggers then you need to have two orders on the list.
You can check out the documentation
here
.
Rajneesh_12
February 2021
@Gafoor
The code that you use means it will buy at "price" and sell at any one of the triggers right?
sujith
February 2021
It will place a limit order when the trigger is hit. You can see the behavior of OCO GTT on the Kite web.
Sign In
or
Register
to comment.
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
You can check out the documentation here.
The code that you use means it will buy at "price" and sell at any one of the triggers right?