# How to check in python if a sell order cannot be done?

**URL:** <https://forum.alpaca.markets/t/how-to-check-in-python-if-a-sell-order-cannot-be-done/9512>\
**Category:** Getting Started with Alpaca\
**Created:** [May 18, 2022, 2:57pm UTC](https://forum.alpaca.markets/t/how-to-check-in-python-if-a-sell-order-cannot-be-done/9512 "2022-05-18T14:57:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guuu\_Ofggg](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/guuu_ofggg/32/3926_2.png) [@Guuu\_Ofggg](https://forum.alpaca.markets/u/Guuu_Ofggg)\
**Post date:** [May 18, 2022, 2:57pm UTC](https://forum.alpaca.markets/t/how-to-check-in-python-if-a-sell-order-cannot-be-done/9512/1 "2022-05-18T14:57:05Z")

</div>

Good morning. I’m trying to sell on short a certain number of stocks using the api.submit\_order instruction, but I get an error of the alpaca API “… trade\_api.rest.APIError: asset “BBIG” cannot be sold short” without the possibility to catch the error using try and except instructions.

Then I go to the web platform and I try to the sell the same stock, after the sell short process is complete, the order is not post in paper trading orders and also I don’t get any error message.

How can I know using python if a stock can be or can not be sell on short?

Best regards

German

---

<div class="post-metadata">

**Author:** ![Guuu\_Ofggg](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/guuu_ofggg/32/3926_2.png) [@Guuu\_Ofggg](https://forum.alpaca.markets/u/Guuu_Ofggg)\
**Post date:** [May 18, 2022, 3:34pm UTC](https://forum.alpaca.markets/t/how-to-check-in-python-if-a-sell-order-cannot-be-done/9512/2 "2022-05-18T15:34:02Z")

</div>

I found the solution getting the information from the stock

```
                    info_asset = api.get_asset(stock)
                    if info_asset.shortable==False:
                        logging.info("Stock "+stock+" it is not possible to sell on short")

```

Thanks

German
