Zapier Integration & User Configuration Features

Another productive month at Alpaca HQ! Read on for more details regarding Replace Order, User Settings through API, Zapier integration, and more.

New Features

Replace Order

The new replace order feature allows you to replace an existing order in one step. You no longer need to separately cancel an existing open order and submit a new order. This feature could also be used to implement trailing stops through the client side.

You can access replace order functionality through the /v2/orders API. This feature allows you to update order attributes of an existing order through a PATCH. The updatable attributes are qty, time_in_force, limit_price, and stop_price.

The order replace request replaces an existing open order with a new order. However, a success return code from a replaced order does NOT guarantee the existing open order has been replaced. If the existing open order is filled before the replacing (new) order reaches the execution venue, the replacing (new) order is rejected, and these events are sent in the trade_updates stream channel. Read more about the trade stream updates here.

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

Also please note that while an order is being replaced, buying power is reduced by the larger of the two orders that have been placed (the old order being replaced, and the newly placed order to replace it). If you are replacing a buy entry order with a higher limit price than the original order, the buying power is calculated based on the newly placed order. If you are replacing it with a lower limit price, the buying power is calculated based on the old order.

Please visit our documentation for more details on how to replace an order.

User Configurations

Don’t want to receive confirmation emails for every trade execution? Want to disable shorting on our v2 API? You can now configure these options through API!

The four user configurations we currently have enabled are: dtbp_check, trade_confirm_email, suspend_trade, and no_shorting .

  • dtbp_check: As you know from our previous update, we have enabled Day Trade Margin Protections to protect users from receiving margin calls for using more than the allowed day trade buying power. You can now modify your protections to on_entry, on_exit, or both directly through the API. We recommend that you keep your setting on_entry to be safe.
  • trade_confirm_email: You can now opt-out of trade confirm emails through the API. We recommend that you opt-in to review your trades.
  • suspend_trade: You can now stop your own trading with an API setting. This could be useful in various scenarios, for example, building your own emergency stop button.
  • no_shorting: Our v2 API allows for shorting, but some users have requested this feature be turned off for them. You can now toggle shorting capabilities through API.

These settings have been added to our documentation. Please view the details here.

Other News


We have an invite only app on Zapier. If you use Zapier already, you can use the Alpaca application. Our in-progress Zapier integration application currently supports 2 triggers (orders and positions) and 6 actions (get account, close all positions, close position, cancel all orders, cancel order, create order).

Please help us test it out and let us know if there’s any questions or issues that arise with using the integration. To try out the integration, visit this link on Zapier:

Login to Zapier | The easiest way to automate your work
Connect the apps you use everyday to automate your work and be more productive. 2,000+ apps and easy integrations - get started in minutes.

Product Roadmap

We’re working on a public roadmap to better communicate features that we’re working on and get your input on what you’d like to see us build! Details coming soon.

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

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