Sell denied due to PDT. But am not using a margin account

Hey all,

Just running through some testing of an application I’ve written using the Alpaca Trading API (alpaca-py) and I noticed that I got flagged as a PDT on my paper account today while testing.

I created a test paper account with €1000 and ran some test trades through it. I noticed when I attempted to sell some assets that I had purchased, I got the following error back from the attempt to submit a sell order: sell for AUID at 5.01 of quantity: 9.0: {“code”:40310100,“message”:“trade denied due to pattern day trading protection”}

That’s weird as I don’t have a margin account and I am just testing with a paper account. Any idea what this is and how I could fix?

Cheers,
Martin.

1 Like

Hi @Martinmc,

PDT rules are applicable to paper trading account as well. You can start another trading account, set a high initial balance and test your trading strategy using that account.

1 Like

I’m going to set my account configuration to “no_shorting”: true in the account configration API. This should prevent PDT applying hopefully.

If you’re on Alpaca’s paper trading account, just give yourself an imaginary balance above $25,000 and the PDT rule won’t be an issue, so long as your balance does not drop below that $25,000 threshold. The PDT rule is a barrier to wealth in the US, but until Trump eliminates it, there’s no practical way around it.

I’d suggest giving yourself a paper account balance of at least $100,000 to ensure you have enough cushion to account for potential losses before dropping below the $25,000 minimum. From a practical standpoint, your trading program should only be able to trade with money in your account greater than that $25,000 floor.

In a conventional cash-only, non-margin account, it takes several days for money to “clear” after each trade, which would be completely impractical for any kind of intraday trading bot. So unless your trade bot is designed for swing trading or investing instead of day-trading, then a cash-only account is probably not going to work.

1 Like

Ah, understandable. Thank you!