Could be a possible bug. Just started going live but my OTO orders are being marked as PDT trades. Only managed to create 3 orders before getting the PDT limits errors.
I created the limit order request with the following code
limit_order_data = LimitOrderRequest(
symbol=ticker,
limit_price=latest_price,
qty=quantity,
side=OrderSide.BUY,
time_in_force=TimeInForce.GTC,
order_class=OrderClass.OTO,
take_profit=TakeProfitRequest(limit_price=take_profit_price),
)
Are OTO orders excluded in potential wash trades like bracket and OCO?
https://docs.alpaca.markets/docs/user-protection#how-alpaca-handles-potential-wash-trades