How to add/update the SL/TP of an open position?

Hello!

I’ve been trying to find information everywhere for a couple of days with no luck, so I decided to post here.

What I’m trying to do is to set or update a Stoploss or Takeprofit of an existing position through the API.

Only thing I was able to do is to create a stop limit order that activates when the price is triggered, but what I really need to do is the SL and TP show on the actual position, as if I did it manually.
image

Im trying to migrate a BOT from another platform where I was able to do that.

Hope I explained myself, thanks in advance!

If I understand correctly, I think what you’re looking for is How to implement OTOCO(TP/SL) orders using API - #23 by crypto123.