Pattern Day Trader counter


I suppose there is a counter to check your pattern day trading situation. Is there any way of knowing, prior to buying a stock, if your day tradding limit is already filled? I mean, is there a way to know, before buying anything, that you will not be able to sell the position in the same day due to pattern day trading protection?

Thank you

OK found it. In the Account model there is daytrade_count (if =3 you can’t trade in the day) and daytrading_buying_power (if =‘0’ you won’t be able to trade in the day).