Not able to place basket order thru multi order api

Read on another thread that basket order is introduced through multi order API. I tried entering but it treats margin requirement separately for both legs rather than taking it for the whole basket.

For some context, I am trying to enter calendar futures position, where I sell 1 lot future of current expiry and buy 1 lot future of next expiry through the multi order API. To do this on the app for, Natural gas lets say, it asks 1.3L in margin, I cant do it through the API though because then it’s asking me to add 1.5L for one leg and 1.2L for the other leg…

Any solutions would be helpful

Hi @ARNAV_40107959

To get margin benefits, please place a BUY leg before the SELL leg. You can refer to our Margin API documentation here: Margin Details | Upstox Developer API.

Additionally, please note that our Place Multi Order API follows the same margin rules as outlined in the Margin API.

If you encounter any further issues, feel free to reach out on this thread.

Thanks!