- ago
When using the Automated Trading API with Alpaca, does the API know if the there is a position to sell. What if a signal comes through to sell but the account does not have any to sell. What happens, is the order ignored? What if an alert says to Buy, but there already there is a position in the account, what happens?
0
1,203
Solved
1 Replies

Reply

Bookmark

Sort
Cone8
 ( 4.83% )
- ago
#1
QUOTE:
Is Alpaca API aware of existing positions?

Yes.

But what you really might want to know is if the Wealth-Lab strategy is aware of broker positions. The answer is no. All trading from a strategy is based on the hypothetical backtest.

In the case of Alpaca, if you try to exit a Position you don't own, you'll get a "does not exist" error, and the strategy will move on.

In the case of Buy, you'll just add more Positions. You can always enter additional positions - it couldn't be any other way.
0
Best Answer

Reply

Bookmark

Sort