# How to submit short order with a trailing stop?

**URL:** https://forum.alpaca.markets/t/how-to-submit-short-order-with-a-trailing-stop/11739
**Category:** Alpaca Integration Applications
**Created:** [February 3, 2023, 7:37pm UTC](https://forum.alpaca.markets/t/how-to-submit-short-order-with-a-trailing-stop/11739 "2023-02-03T19:37:17Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![John\_Jay](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/john_jay/32/5083_2.png) [@John\_Jay](https://forum.alpaca.markets/u/John_Jay)
#### Post date: [February 3, 2023, 7:37pm UTC](https://forum.alpaca.markets/t/how-to-submit-short-order-with-a-trailing-stop/11739/1 "2023-02-03T19:37:17Z")

</div>

I’m trying to submit a short sale on a stock but I want to add a trailing stop, like so:

api.submit\_order(  
symbol=‘AMD’,  
qty=1,  
side=‘sell’,  
type=‘trailing\_stop’,  
trail\_percent=4.0,  
time\_in\_force=‘day’,  
)

However this does not get filled on the paper account. I think the trailing stop might not be right because it is a short sale

---

<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: [February 4, 2023, 4:06pm UTC](https://forum.alpaca.markets/t/how-to-submit-short-order-with-a-trailing-stop/11739/2 "2023-02-04T16:06:11Z")

</div>

@John_Jay That order should work. It should sell (ie sell short if one doesn’t have a position) if the price of AMD drops 4% below the “high water mark” (HWM). The HWM begins tracking when the order is placed. It doesn’t look back in history to get a HWM. So, did the price of AMD drop 4% from the highest price as of the time you placed the order? Only then would it have executed.

---

<div class="post-metadata">

### Author: ![anthony1](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@anthony1](https://forum.alpaca.markets/u/anthony1)
#### Post date: [August 25, 2024, 4:19am UTC](https://forum.alpaca.markets/t/how-to-submit-short-order-with-a-trailing-stop/11739/3 "2024-08-25T04:19:36Z")

</div>

I believe what the original poster was trying to ask was how do you set a trailing stop percent on a short sell rather than how to set a sell to execute once the stock drops a certain percentage. For example, if I short a stock at $50, and it goes up a certain percentage, that position should be closed via a buy to cover or whatever. I have been trying to figure this out as well as it seems putting a trail percent on a short sell order makes the order not go through.

---

<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: [August 25, 2024, 4:43pm UTC](https://forum.alpaca.markets/t/how-to-submit-short-order-with-a-trailing-stop/11739/4 "2024-08-25T16:43:44Z")

</div>

@anthony1 If you have an existing short position (eg hold -10 shares of XYZ and a cost basis of $10.00), you can place a trailing stop order to ‘buy to cover’ if/when the price goes up to $10.50 with an order like this

```auto
curl --request POST \
     --url https://paper-api.alpaca.markets/v2/orders \
     --header 'APCA-API-KEY-ID: xxxxx' \
     --header 'APCA-API-SECRET-KEY: xxxxx' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "side": "buy",
  "type": "trailing_stop",
  "time_in_force": "gtc",
  "symbol": "XYZ",
  "qty": "10",
  "trail_price": "10.50"
}
'

```

Is that what you were trying to do?

---

<div class="post-metadata">

### Author: ![anthony1](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@anthony1](https://forum.alpaca.markets/u/anthony1)
#### Post date: [August 26, 2024, 1:54am UTC](https://forum.alpaca.markets/t/how-to-submit-short-order-with-a-trailing-stop/11739/5 "2024-08-26T01:54:48Z")

</div>

Oh yes, thank you very much.
