Erroneous documentation and bug in last_maintenance_margin?

I am paper trading still (thankfully), so the consequences of these issues are a nuisance. However, they are still concerning. Unless there is a caveat I am missing, the documentation on buying power is just wrong:


“The buying_power value is the larger of regt_buying_power and daytrading_buying_power.”

As you can see from the account detail (below), buying_power is show as ~$307k, but daytrading_buying_power = 0.

The documentation error aside, I am now stuck, being unable to trade even a single share in either side (short/long) because the last_maintenance_margin does not seem to update until the end of the day. Why would that be? Is that a regulatory requirement, an Alpaca design decision (I’d like to understand the rationale behind that), or a bug?

Account({ ‘account_blocked’: False,
‘account_number’: ‘*****************’,
‘buying_power’: ‘307701.8’,
‘cash’: ‘153850.9’,
‘created_at’: ‘2020-08-10T13:24:03.927218Z’,
‘currency’: ‘USD’,
‘daytrade_count’: 1,
‘daytrading_buying_power’: ‘0’,
‘equity’: ‘153850.9’,
‘id’: ‘f424ac96-e3e9-4aff-bc15-e346892429a7’,
‘initial_margin’: ‘0’,
‘last_equity’: ‘159623.5’,
‘last_maintenance_margin’: ‘163316.475’,
‘long_market_value’: ‘0’,
‘maintenance_margin’: ‘0’,
‘multiplier’: ‘4’,
‘pattern_day_trader’: False,
‘portfolio_value’: ‘153850.9’,
‘regt_buying_power’: ‘307701.8’,
‘short_market_value’: ‘0’,
‘shorting_enabled’: True,
‘sma’: ‘0’,
‘status’: ‘ACTIVE’,
‘trade_suspended_by_user’: False,
‘trading_blocked’: False,
‘transfers_blocked’: False})