# Bracket Order Error for Shorting

**URL:** https://forum.alpaca.markets/t/bracket-order-error-for-shorting/16915
**Category:** Alpaca Trading
**Created:** [May 13, 2025, 10:06pm UTC](https://forum.alpaca.markets/t/bracket-order-error-for-shorting/16915 "2025-05-13T22:06:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Artic](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/artic/32/7205_2.png) [@Artic](https://forum.alpaca.markets/u/Artic)
#### Post date: [May 13, 2025, 10:06pm UTC](https://forum.alpaca.markets/t/bracket-order-error-for-shorting/16915/1 "2025-05-13T22:06:46Z")

</div>

Could I get some help setting up a SELL bracket order for shorting? What is the proper syntax? I’ve tried the code below from examples on alpaca but its not working for shorting.

```
       market_order_data = MarketOrderRequest(
                    symbol="NVDA",
                    qty=teslashares,
                    side=OrderSide.SELL,
                    time_in_force=TimeInForce.DAY,
                    order_class=OrderClass.BRACKET,
                    take_profit=TakeProfitRequest(limit_price=prof),
                    stop_loss=StopLossRequest(stop_price=loss)
                    )
            # Market order
        market_order = trading_client.submit_order(
            order_data=market_order_data
           )

```
