Another productive month at Alpaca HQ! Read on for more details regarding Replace Order, User Settings through API, Zapier integration, and more.
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
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.
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.
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: 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
bothdirectly through the API. We recommend that you keep your setting
on_entryto 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.
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: https://zapier.com/developer/public-invite/31338/88982ba24cdc49b12b6a2570814c2eae/
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.