Tradoflow

How to close a position on Alpaca

This guide will walk you through the various methods for closing a position on Alpaca using Tradoflow.

Automatic Close Using the "Close Position" Event

If you are unsure of the exact details of your open position, you can use the "Close position" event in the Template-page. Tradoflow will automatically determine the correct parameters to create an opposing template and close the position.

You simply need to generate the signal:

{
    "symbol": "AAPL",
    "userId": "abc"
    "event": "closePosition"
  }

Closing All Positions on Alpaca

The second option is to close all open positions on Alpaca using the "Close All Positions" button available on the Connections- page in Tradoflow. Use this option with caution, as it will close all of your open positions simultaneously.