# 403 - insufficient qty available for order (requested: 40, available: 0)

**URL:** <https://forum.alpaca.markets/t/403-insufficient-qty-available-for-order-requested-40-available-0/15147>\
**Category:** Alpaca Trading\
**Created:** [October 10, 2024, 3:40pm UTC](https://forum.alpaca.markets/t/403-insufficient-qty-available-for-order-requested-40-available-0/15147 "2024-10-10T15:40:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vishal\_C](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/vishal_c/32/5760_2.png) [@Vishal\_C](https://forum.alpaca.markets/u/Vishal_C)\
**Post date:** [October 10, 2024, 3:40pm UTC](https://forum.alpaca.markets/t/403-insufficient-qty-available-for-order-requested-40-available-0/15147/1 "2024-10-10T15:40:44Z")

</div>

I have short position of 40 shares bracket order with NVDA. I am trying to close the position using the below API but it does not work.  
**Closing all the positions works using this [https://paper-api.alpaca.markets/v2/positions](https://paper-api.alpaca.markets/v2/positions)**  
**However closing individual positions does not work using this one '[https://paper-api.alpaca.markets/v2/positions/NVDA?percentage=100](https://paper-api.alpaca.markets/v2/positions/NVDA?percentage=100)**

> Blockquote  
> curl --request DELETE   
> –url ‘[https://paper-api.alpaca.markets/v2/positions/NVDA?percentage=100](https://paper-api.alpaca.markets/v2/positions/NVDA?percentage=100)’   
> –header ‘APCA-API-KEY-ID: \*\*\*\*\*\*\*\*’   
> –header ‘APCA-API-SECRET-KEY: \*\*\*\*\*\*\*\*\*\*’   
> –header ‘accept: application/json’

Response is

> Blockquote  
> {  
> “available”: “0”,  
> “code”: 40310000,  
> “existing\_qty”: “40”,  
> “held\_for\_orders”: “40”,  
> “message”: “insufficient qty available for order (requested: 40, available: 0)”,  
> “symbol”: “NVDA”  
> }

I tried to using different percentages 100, -100,  
Changes quantity to 40, -40. However it does not work. Please update the above API and also add a flag to cancel open orders for that symbol like we have for close all positions API.

If there is any alternative in the mean time that would be helpful.

Thanks and appreciate your help.

---

<div class="post-metadata">

**Author:** ![Vishal\_C](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/vishal_c/32/5760_2.png) [@Vishal\_C](https://forum.alpaca.markets/u/Vishal_C)\
**Post date:** [October 10, 2024, 5:49pm UTC](https://forum.alpaca.markets/t/403-insufficient-qty-available-for-order-requested-40-available-0/15147/2 "2024-10-10T17:49:40Z")

</div>

Any way I have figured this out. The Documentation needs to be updated.  
There is a flag “cancel\_orders” : true that needs to be passed in the delete request. Percentage or quantity did not work for me.
