☰
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.8K
All Categories
0
Incidents
154
Node JS client
40
Go client
793
.Net API client
378
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
993
Java client
1.1K
API clients
404
PHP client
4K
Python client
346
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.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",
)