is there any api which allows, buy, sl and target, at the same time…Means I can place order in three legs, buy, stopploss and target at same time
Currently, there is no specific API designed for this purpose. However, you can use the Multi Order API to achieve it.
With a multi-order request, the system processes all BUY orders first, followed by all SELL orders. This approach ensures consistent and orderly handling of multiple order types within a single request.
For more details, refer to the documentation: Place Multi Order API.