☰
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
12.5K
All Categories
100
Node JS client
35
Go client
741
.Net API client
345
Kite Publisher
528
.Net / VBA / Excel (3rd party)
411
Algorithms and Strategies
920
Java client
958
API clients
389
PHP client
3.5K
Python client
318
Mobile and Desktop apps
1.2K
Market data (WebSockets)
3K
General
In this Discussion
September 2016
SanketParmar
September 2016
soumyadeep
How to place bracket order(BO)?
SanketParmar
September 2016
in
Python client
I want to place a BO order from my script. As specified in document, I added
order_variety="bo"
in But it failed. Following are my code and error:
order_id = kite.order_place(
tradingsymbol="LUPIN",
exchange="NSE",
quantity=1,
transaction_type="BUY",
order_type="LIMIT",
price=1550,
squareoff_value=2,
stoploss_value=2,
order_variety="bo",
)
Error:
Traceback (most recent call last):
File "./kite_test.py", line 39, in
order_variety="bo",
TypeError: order_place() got an unexpected keyword argument 'order_variety'
I tried without order_variety keyword, But then it places MIS limit order only.
Any help?
Tagged:
BO
soumyadeep
September 2016
Remove the comma before the closing bracket. Use variety='regular' and not order_variety="bo"
soumyadeep
September 2016
Sorry, Use variety='bo' and not order_variety="bo"
SanketParmar
September 2016
Thanks soumyadeep.
Following works for me.
order_id = kite.order_place(
tradingsymbol=TICKER,
exchange="NSE",
quantity=UNITS,
transaction_type="BUY",
order_type="LIMIT",
price=1505,
squareoff_value=2,
stoploss_value=2,
variety="bo",
validity="DAY",
)
Sign In
or
Register
to comment.
Following works for me.
order_id = kite.order_place(
tradingsymbol=TICKER,
exchange="NSE",
quantity=UNITS,
transaction_type="BUY",
order_type="LIMIT",
price=1505,
squareoff_value=2,
stoploss_value=2,
variety="bo",
validity="DAY",
)