Can anyone help me to understand how can I execute buy orders before sell orders in multi leg strategies. I have my code like- kite.place_order(BUY) kite.place_order(BUY) kite.place_order(SELL) kite.place_order(SELL) I expect BUY orders to be executed before to avoid margin based order rejections.
If they are market orders,put some delay between buy and sell orders. If they are limit orders,then you have to check the status of the buy positions using on_order_update ,and place sell orders only after the buy orders have been completed.