Is it a way to cancel tp/sl with BiByt API

63 views Asked by At

In the ByBit API, you can easily create TP/SL: https://bybit-exchange.github.io/docs/v5/position/trading-stop

But can it be removed?

I've come to the problems that there can only be 20 TP/SL a time, but I need to rearrange them, so it would be great if I could rearrange some of them.

I searched all the documentation, but there was nothing about it anywhere.

1

There are 1 answers

0
Naveed Ali On

Creating TP/SL orders using trading-stop doesn't provide orderId, so when you don't have orderId you can't cancel it through their cancel order api.

You can cancel the TP/SL order using trading-stop API, just pass takeProfit='0' 'stopLoss='0'

takeProfit: Cannot be less than 0, 0 means cancel TP.

stopLoss: Cannot be less than 0, 0 means cancel SL