In Zerodha kite api how to place "SL Buy Order" with StopLoss and Target Levels (GTT) defined?

maulikkite
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”.

In Zerodha website, on the Order placing popup screen, you can select "Advanced" and then specify values for "Stoploss" and "Target" and I am trying to put that type of order through python api.

My Code as below
optionName = “NIFTY24D1224500PE”
lot_size= 25
no_of_lots=1
meta = {‘gttp’:[[1,-10],[1,20]]}

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’
Sign In or Register to comment.