☰
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.2K
All Categories
0
Incidents
127
Node JS client
36
Go client
765
.Net API client
360
Kite Publisher
532
.Net / VBA / Excel (3rd party)
433
Algorithms and Strategies
964
Java client
1K
API clients
400
PHP client
3.8K
Python client
331
Mobile and Desktop apps
1.3K
Market data (WebSockets)
3.1K
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",
)