"trade denied due to pattern day trading protection" - not sure why I get this error

I am using the REST API for paper trading (setup with $2,000 account balance) and I see the following error response :-

ALPACA order request (BUY):
{'symbol': 'NIO', 'qty': 10, 'side': 'buy', 'type': 'limit', 'limit_price': 13.92, 'time_in_force': 'day', 'order_class': 'bracket', 'take_profit': {'limit_price': 13.959861396981603}, 'stop_loss': {'stop_price': 13.880138603018397}}

ALPACA order response (BUY):
{'code': 40310100, 'message': 'trade denied due to pattern day trading protection'}

Can someone help me understand what is going on here ?

This is not the first time I am seeing this since morning and I am losing a lot of trades because of this.


Hey @sks2020

I know accounts can get flagged for PDT if they make 4 or more day trades over the last 5 trading days. Since your account is below the $25,000 limit for PDT perhaps this is the case for you.

Here is a link to more information concerning PDT