I am using the REST API with Python with just under $20k in my live account. As of right now, my trading process with Alpaca is:
- Buy stocks during regular market hours
- Submit 4% trailing stop orders at the end of regular market hours
I repeated this process for 7 trading days on my paper trading account without issue and just switched over to the live account today. Step 1 worked fine with the REST API, but now I am trying to submit trailing stops and keep getting [“alpaca_trade_api.rest.APIError: trade denied due to pattern day trading protection”].
I’m confused because (1) I am not actually selling, only submitting trailing stops on stocks, and (2) the User Protections doc mentions these same issues should have shown up during paper trading if doing so would have raised errors, which it never did.
Interestingly enough, of the 11 stocks I was trying to submit the trailing stops for (all of which I bought today during market hours), 3 were accepted–the same 3 that ended the day in the red. The other 8 that ended in the green are the specific ones that are rejecting my trailing stop orders. Not sure if this is a related issue, but thought I should include.