Trailing Stop Orders on Alpaca!

Launching Trailing Stop Orders

(For details on how this works, please see the docs here https://alpaca.markets/docs/trading-on-alpaca/orders/#trailing-stop-orders)

New types of advanced orders are always exciting!

After launching OCO/OTO almost 6 months ago, we have been working on another hugely requested advanced order type, yes, Trailing Stop Orders! Today, we are excited to announce Trailing Stop Orders as a new addition to the list of advanced order types offered by Alpaca Trading API.

You can jump right into the API doc here.

Understand Orders - Documentation | Alpaca
Alpaca API lets you build and trade with real-time market data for free.

How Trailing Stop Orders Work

*Please do note that this is for illustration only and is not a recommendation or suggestion of this trade

Trailing stop orders allow you to continuously and automatically keep updating the stop price threshold based on the stock price movement.

In order to decide how you want the stop price threshold to be automatically updated, you can request either:

  • a single order with a dollar offset value (trail_price: string<number> a dollar value away from the highest water mark. If you set this to 2.00 for a sell trailing stop, the stop price is always hwm - 2.00.) or
  • percentage value (trail_percent: string<number> a percent value away from the highest water mark. If you set this to 1.0 for a sell trailing stop, the stop price is always hwm * 0.99.)

as the trail to the latest stock price. The latest stop price of a trailing stop order automatically gets updated as the stock price moves in your favorable way, or it stays at the last level otherwise.

This way, you may not need to monitor the price movement and keep sending replace requests to update the stop price that is close to the latest market movement. The stop price of a trailing stop order gets updated automatically.

You can also read the explanation of Trailing Stop Orders from Investopedia.

Trailing Stop Definition and Uses
A trailing stop is a stop order that tracks the price of an investment vehicle as it moves in one direction, but the order will not move in the opposite direction.

Try Today!

For details on how you can place a trailing stop order via API, please see the docs here.

Understand Orders - Documentation | Alpaca
Alpaca API lets you build and trade with real-time market data for free.

Happy trading!

---

Follow @AlpacaHQ on Twitter!

Conditional orders may have increased risk as a result of their reliance on trigger processing, market data, and other internal and external systems. Such orders are not sent to the market until specified conditions are met. During that time, issues such as system outages with downstream technologies or third parties may occur. Conditional orders triggering near the market close may fail to execute that day. Furthermore, our executing partner may impose controls on conditional orders to limit erroneous trades triggering downstream orders. Alpaca Securities may not always be made aware of such changes to external controls immediately, which may lead to some conditional orders not being executed. As such, it is important to monitor conditional orders for reasonability. Conditional orders are “Not Held” orders whose execution instructions are on a best efforts basis upon being triggered. Furthermore, conditional orders may be subject to the increased risks of stop orders and market orders outlined above. Given the increased potential risk of using conditional orders, the client agrees that Alpaca Securities cannot be held responsible for losses, damages, or missed opportunity costs associated with market data problems, systems issues, and user error, among other factors. By using conditional orders the client understands and accepts the risks outlined above. Alpaca Securities encourages leveraging the use of Paper accounts to become more comfortable with the intricacies associated with these orders.

Brokerage services are provided by Alpaca Securities LLC ("Alpaca"), member FINRA/SIPC, a wholly-owned subsidiary of AlpacaDB, Inc. Technology and services are offered by AlpacaDB, Inc.

Interested in learning more about Broker API?

Don't miss out on any updates about our Broker API suite of solutions! Share your details with us and be the first to know about our latest content.

Author image
Co-founder & CEO of Alpaca
You've successfully subscribed to Alpaca Blog | Developer-First API for Stocks, Options, and Crypto
Great! Next, complete checkout for full access to Alpaca Blog | Developer-First API for Stocks, Options, and Crypto
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.