# Cannot cancel order or liquidate

**URL:** https://forum.alpaca.markets/t/cannot-cancel-order-or-liquidate/4096
**Category:** App-Integration
**Created:** [January 27, 2021, 5:03pm UTC](https://forum.alpaca.markets/t/cannot-cancel-order-or-liquidate/4096 "2021-01-27T17:03:47Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![babayking](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@babayking](https://forum.alpaca.markets/u/babayking)
#### Post date: [January 27, 2021, 5:03pm UTC](https://forum.alpaca.markets/t/cannot-cancel-order-or-liquidate/4096/1 "2021-01-27T17:03:47Z")

</div>

Hello, I have an open short position for MNSO and I might have a trailing stop order on it (I am saying I might, because I forgot and nothing is showing up on the order activity). When I tried api.cancel\_all\_order, it is not clearing any pending order on this and when I do api.close\_all\_position, it is not getting liquidated. When I tried manually liquidating from the alpaca paper trading account, it is saying:  
Failed to liquidate position in MNSO

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

please help on how to liquidate this.

---

<div class="post-metadata">

### Author: ![Dan\_Whitnable\_Alpaca](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/dan_whitnable_alpaca/32/1658_2.png) [@Dan\_Whitnable\_Alpaca](https://forum.alpaca.markets/u/Dan_Whitnable_Alpaca)
#### Post date: [January 27, 2021, 5:10pm UTC](https://forum.alpaca.markets/t/cannot-cancel-order-or-liquidate/4096/2 "2021-01-27T17:10:58Z")

</div>

The message `insufficient qty available for order (requested: 100, available: 0)` implies that you either 1) have already liquidated the position (ie the quantity is 0) or 2) that you already have an existing buy order for 100 (you cannot have more open orders than share available). I guess the problem is the latter.

Check if you have any open orders for that stock via the web portal. If so, you can cancel them from there, Once canceled you will be able to liquidate the position.

Try that.

---

<div class="post-metadata">

### Author: ![babayking](https://avatars.discourse-cdn.com/v4/letter/b/96bed5/32.png) [@babayking](https://forum.alpaca.markets/u/babayking)
#### Post date: [January 27, 2021, 6:09pm UTC](https://forum.alpaca.markets/t/cannot-cancel-order-or-liquidate/4096/3 "2021-01-27T18:09:44Z")

</div>

Thanks @Dan_Whitnable_Alpaca. I thought so too, I see a ‘pending cancel’ buy order, but why would it not cancel? It is stuck at that state and accumulating loss

---

<div class="post-metadata">

### Author: ![Dan\_Whitnable\_Alpaca](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/dan_whitnable_alpaca/32/1658_2.png) [@Dan\_Whitnable\_Alpaca](https://forum.alpaca.markets/u/Dan_Whitnable_Alpaca)
#### Post date: [January 27, 2021, 6:31pm UTC](https://forum.alpaca.markets/t/cannot-cancel-order-or-liquidate/4096/4 "2021-01-27T18:31:15Z")

</div>

If an order is ‘stuck’ in pending cancel for more than a few minutes, please email support at support@alpaca.markets. Include a description of the problem (ie order is stuck in ‘pending cancel’), the email used for the account, whether it is for paper or live trading, and if you have it, the order number. They will be able to resolve the issue.

---

<div class="post-metadata">

### Author: ![MallocThePD](https://avatars.discourse-cdn.com/v4/letter/m/8e8cbc/32.png) [@MallocThePD](https://forum.alpaca.markets/u/MallocThePD)
#### Post date: [June 28, 2022, 7:33pm UTC](https://forum.alpaca.markets/t/cannot-cancel-order-or-liquidate/4096/5 "2022-06-28T19:33:38Z")

</div>

Thank you so much for the answer!  
I have been looking for info on this issue for a while now.

There are tons of people asking on this throughout the forum. Maybe you should reply to them as well? On a first glance it seems like an error at your end. I bet you are loosing customers over this.
