How to place bracket order(BO)?

SanketParmar
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:
  • soumyadeep
    Remove the comma before the closing bracket. Use variety='regular' and not order_variety="bo"
  • soumyadeep
    Sorry, Use variety='bo' and not order_variety="bo"
  • SanketParmar
    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.