How to cancel bracket order from REST API(paper trading)


I’m developing app for auto trading. Everything was fine until I decide to implement stop_loss and take_profit. When I’m trying to sell (or buy in short) I’m receiving “forbidden” from serwer. When I was trying to liquidate form web page I received:

insufficient qty available for order (requested: 100, available: 0)

So I’m assuming that, I cannot liquidate order because I already have sell order form bracket, but with status “held”. So far everything is clear, but how can I cancel this “held” orders? Endpoint:
returns orders which all has “accepted” status. Is there a way to liquidate order and cancel brackets at once?

Ok, done.

In my opinion when you click “liquidate all” form app, all positions should be liquidate beside of held orders. Now if I want to close position I need to first click on every held order and only then i can close all positions which is stupid way, because my profit can change meanwhile