Order Place api

I want to know how can place order using api.
I want to place order with buying price, and set trigger price to sell and stoploss price also.
ex: current price is 45rs and i want to set buy price at 44.5rs and trigger at 46rs and stoploss at 43rs.
Note In option trading(Nifty 50)
In single api request

Currently, you cannot execute a two-legged order using API. To replicate the scenario mentioned, you must place a limit buy order and a stop loss limit order separately.

but i place limit order but it not executed but i get orderid can you give me the sample buy and sell payload in has per mention is above query