Stop loss and take profit margin order as OCO.

Hi there,
I read a statement somewhere on Reddit.
image
How can we place an One Cancel Other order in Binance API trading bot for margin orders? I dont want to wait for placing order if the price hit my calculated stop loss or take profit point because of internet connection risks.
Tks

Margin OCO is indeed not available through REST API yet.
You can place limit maker order and then use websocket to monitor latest prices, if it matches your stop price, you cancel the limit maker and place a new market /limit order to stop loss.
Websocket is stable, but if you’re concern with the connection risks, I’m afraid this is the only alternative.