How to cancel all open MIS orders and exit all open MIS positions?

Please refer to this sample code:

a=api.positions()
a=pd.DataFrame(a)
for i in a.itertuples():
if int(i.netqty)<0: api.place_order(buy_or_sell=’B’, product_type=’I’, exchange=’NSE’, tradingsymbol=i.tysm, quantity=int(i.netqty), discloseqty=0,price_type=’MKT’, price=0, rigger_price=None, retention=’DAY’, remarks=’my_order_001′) if int(i.netqty)>0: api.place_order(buy_or_sell=’S’, product_type=’I’, exchange=’NSE’, tradingsymbol=i.tysm, quantity=int(i.netqty), discloseqty=0,price_type=’MKT’, price=0, trigger_price=None,retention=’DAY’, remarks=’my_order_001′)

Still Have Doubts? Talk to Us

If your question wasn’t answered above, we’re here for you. Reach out to our team for assistance.

Chat with us

Got questions? Get answers instantly

Contact us

Reach out to our customer care team for quick assistance

Customer Support