# BUG: Filled orders are cancellable (At least the API thinks)

**URL:** <https://forum.alpaca.markets/t/bug-filled-orders-are-cancellable-at-least-the-api-thinks/5676>\
**Category:** Alpaca Account Troubleshooting\
**Created:** [May 12, 2021, 10:20am UTC](https://forum.alpaca.markets/t/bug-filled-orders-are-cancellable-at-least-the-api-thinks/5676 "2021-05-12T10:20:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhoehl](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@dhoehl](https://forum.alpaca.markets/u/dhoehl)\
**Post date:** [May 12, 2021, 10:20am UTC](https://forum.alpaca.markets/t/bug-filled-orders-are-cancellable-at-least-the-api-thinks/5676/1 "2021-05-12T10:20:28Z")

</div>

The problem occurs on a paper trading account

What is the problem:  
The API result of the cancel order API return 204 even if the order was filled and cannot be cancelled anymore. I never got anything else back from that endpoint. (The order itself stays filled if I check online)

Example request:

DELETE [https://paper-api.alpaca.markets/v2/orders/66571186-97b2-4489-9813-752c7fd2c2ee](https://paper-api.alpaca.markets/v2/orders/66571186-97b2-4489-9813-752c7fd2c2ee)

(This paper trade was filled yesterday - The cancel request was executed just now)

Response:

204 [https://paper-api.alpaca.markets/v2/orders/66571186-97b2-4489-9813-752c7fd2c2ee](https://paper-api.alpaca.markets/v2/orders/66571186-97b2-4489-9813-752c7fd2c2ee) (1152ms)

There is cleary something broken on your end

---

<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:** [May 12, 2021, 1:49pm UTC](https://forum.alpaca.markets/t/bug-filled-orders-are-cancellable-at-least-the-api-thinks/5676/2 "2021-05-12T13:49:26Z")

</div>

@dhoehl Thank you for pointing this out. This does indeed seem to be a bug. When trying to cancel an paper order with a status `filled` it returns a 204. It should return a 422 according to the documentation. I’ve submitted an issue report to the Alpaca engineering team. Please let us know if you find other inconsistencies or errors like this in the future.

---

<div class="post-metadata">

**Author:** ![galkinc](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/galkinc/32/5301_2.png) [@galkinc](https://forum.alpaca.markets/u/galkinc)\
**Post date:** [April 13, 2023, 3:33pm UTC](https://forum.alpaca.markets/t/bug-filled-orders-are-cancellable-at-least-the-api-thinks/5676/3 "2023-04-13T15:33:24Z")

</div>

found that the bug is reproducing
