In Zerodha Kite api how can I place SL Buy Order with Stop Loss and Target Levels for GTT orders defined ? This same thing can be done in their front end website so I am trying to put the same order through python api. Please note that I am easily able to place “SL Buy Orders” with Zerodha kite api but I am not able to place “SL Buy Orders with Stop Loss and Target Levels (for GTT orders) defined”.
I am attaching print-screen from the Zerodha Website to explain which type of order I want to place through python api code.
My Code as below
optionName = “NIFTY24D1224500PE”
lot_size= 25
no_of_lots=1
meta = {‘gttp’:[[1,-12],[1,25]]}
order_id = kite.place_order(variety = kite.VARIETY_REGULAR, exchange = kite.EXCHANGE_NFO, tradingsymbol = optionName ,
transaction_type = kite.TRANSACTION_TYPE_BUY, quantity = lot_size * no_of_lots , product = kite.PRODUCT_NRML,
order_type = kite.ORDER_TYPE_SL, price=97.0, validity=kite.VALIDITY_DAY, disclosed_quantity=None,
trigger_price=90.0, squareoff=None, stoploss=None, trailing_stoploss=None, tag=None, meta=meta)
Is giving Error as below,
TypeError: place_order() got an unexpected keyword argument ‘meta’
