stoploss updated to an existing order or new order with stoploss -- kindly help

rajdkumar
order_id = tt.kite.place_order(tradingsymbol="BANKNIFTY2450849200CE",
exchange=tt.kite.EXCHANGE_NFO,
transaction_type=tt.kite.TRANSACTION_TYPE_BUY,
quantity=15,
product=tt.kite.PRODUCT_MIS,
variety=tt.kite.VARIETY_REGULAR,
trigger_price=600, # Stop Loss price
order_type = tt.kite.ORDER_TYPE_SL,
stoploss=610)
print("Stop Loss order placed successfully. Order ID:", order_id)

Following is the error i'm receiving --
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Input In [22], in ()
----> 1 order_id = tt.kite.place_order(tradingsymbol="BANKNIFTY2450849200CE",
2 exchange=tt.kite.EXCHANGE_NFO,
3 transaction_type=tt.kite.TRANSACTION_TYPE_BUY,
4 quantity=15,
5 product=tt.kite.PRODUCT_MIS,
6 variety=tt.kite.VARIETY_REGULAR,
7 trigger_price=610, # Stop Loss price
8 order_type = tt.kite.ORDER_TYPE_SL,
9 stoploss=610)
10 print("Stop Loss order placed successfully. Order ID:", order_id)

TypeError: place_order() got an unexpected keyword argument 'stoploss'
Tagged:
  • rajdkumar
    The intention here is to move the stoploss dynamically once the order is placed
  • rakeshr
    TypeError: place_order() got an unexpected keyword argument 'stoploss'
    toploss=610
    You need to use price and trigger_price for placing stoploss order. Stoploss and square-off were for the bracket order, and it has been deprecated.
  • rajdkumar
    Thank you
This discussion has been closed.