Only 1 quantity squared off
-
netpos = obj.position() if netpos['data'] != None : for o in netpos['data'] : if int(o['netqty']) != 0 : transactiontype = "SELL" if int(o['netqty']) > 0 else "BUY" place_order(o['symboltoken'],o['tradingsymbol'],o['lotsize'],transactiontype,'MARKET',0,'NORMAL',o['exchange'],int(o['netqty']) time.sleep(0.2)
Hey @admin , in the above code, if i have more than 1 quantity of a position, then too only 1 quantity is squared off.
can you please check??
1 out of 1