Environment
Python 3.9.1
Alpaca SDK Version
alpaca-trade-api 0.51.0
Problem
Summary
When I call the API to get the day trading buying power for my account it returns $0. The rest of the data returned by the api.get_account() call are correct. E.g. it correctly reports the equity in my account.
Paper or Live Trading?
This is only with my live account. It works correctly with paper trading. I just funded my live account at the end of last week, and this is the first time I’ve traded in it. When paper trading I set the starting balance to the same amount that I funded the live account with, and I meet the PDT rule requirements.
Example Code
api.get_account().daytrading_buying_power