Skip to content

Learn

Exchange APIs

Alpaca removed the PDT rule: what changed for API code

Figures on this page are as of 2026-09. Fees, limits and margin tiers change — check the venue's own docs.

The Pattern Day Trader rule no longer applies at Alpaca: FINRA amended Rule 4210 to replace the PDT provisions with an intraday margin framework, effective June 4, 2026, and Alpaca has lifted PDT in production for both Trading API users and Broker API partners.

If you arrived here from an error log containing 40310100 “trade denied due to pattern day trading protection”, or from a tutorial explaining how to stay under the PDT limit, that material describes a rule that is no longer in force at Alpaca. This page is for developers with Alpaca integrations: what changed, which API fields went away and when, and what code that relied on them has to do now. It describes a rule change. It is not advice about how, or how often, to trade.

Why this matters now

Two things broke at once for anyone with older Alpaca code.

The concept went away. Alpaca’s list of what it removed includes the Pattern Day Trader designation and all PDT-based account restrictions, the PDT minimum-equity requirement, and day trade counting and buying power logic. Accounts that had been restricted for PDT violations were unrestricted. Alpaca’s FAQ on the change (updated July 2026) says the definition of a pattern day trader has been eliminated, and brokers are no longer required to track round-trip day trade counts or restrict accounts on that basis.

The fields went away. Alpaca’s changelog of 2026-06-03 announced that pattern day trading and day-trading buying power fields were deprecated and would be removed on 2026-07-06. That date has passed. Code that still reads them is reading fields that no longer exist.

The second one is the one that fails in production. A rule change is something you read about; a missing key in a JSON response is something your process trips over on its next request.

How it actually works

The change has four parts, with dates where Alpaca and FINRA give them:

  1. The rule change — effective June 4, 2026. FINRA amended Rule 4210, replacing the pattern day trader provisions with an intraday margin framework. The SEC approved the proposed change and FINRA announced the effective date.
  2. Deprecation notice — 2026-06-03. Alpaca’s changelog marked the PDT and DTBP fields as deprecated, with removal scheduled for 2026-07-06.
  3. The production switch. Alpaca lifted the PDT rule and replaced it with its intraday margin framework in production, for Trading API users and Broker API partners.
  4. Field removal — 2026-07-06. The removal date announced for the deprecated fields on the affected endpoints.

The fields named by Alpaca:

FieldWhereSource
daytrade_countAccount (GET /v2/account)Changelog 2026-06-03
daytrading_buying_powerAccount (GET /v2/account)Changelog 2026-06-03
dtbp_checkAccount configurations (GET / PATCH /v2/account/configurations)Changelog 2026-06-03
pattern_day_traderAccountAlpaca blog
last_daytrade_countAccountAlpaca blog
last_daytrading_buying_powerAccountAlpaca blog

Alpaca’s blog tells integrators to replace these with buying_power. The current GET /v2/account reference no longer lists a pattern_day_trader field.

What replaced the old mechanics, in Alpaca’s words: Intraday Buying Power replaces Day Trade Buying Power, Intraday Margin Calls replace Day Trade Margin Calls, and pre-trade checks reject orders that would put the account into a margin deficit. The thresholds, deficit allowances, freeze periods and cure periods of the new framework are regulatory and house figures that can change; for those, read Alpaca’s intraday margin rule page and FINRA’s own Rule 4210 materials rather than any summary, this one included.

The PDT rule vs the intraday margin framework

The mistake to avoid is reading “PDT is gone” as “there is no longer any limit on intraday trading”. That is not what either Alpaca or FINRA says.

Before (PDT)Now (intraday margin)
What was trackedA count of day trades and a PDT designationIntraday margin on the account
Buying power conceptDay Trade Buying PowerIntraday Buying Power
Margin callsDay Trade Margin CallsIntraday Margin Calls
Order-time refusalThe PDT protection rejection (40310100, historical)Pre-trade checks reject orders that would create a margin deficit
API fieldsdaytrade_count, daytrading_buying_power, pattern_day_trader, …Removed; buying_power is what Alpaca points to

The shape of the constraint changed; the existence of one did not. An order can still be refused before it reaches the market. What it is refused for is different, and so is what your code should look at first.

Two honest gaps. We did not find documentation of the code or message the new pre-trade check returns when it rejects an order, so we cannot tell you what string to match. And whether 40310100 can still be returned after June 4, 2026 is not something we could confirm; Alpaca’s statement that all PDT-based restrictions were removed implies it should not be. That code comes from Alpaca’s own error guide published before the change, and we did not find it in the API reference.

This page covers Alpaca’s implementation. For how the underlying rule applies elsewhere, check FINRA’s current documentation and your own broker’s.

Where the boundary should sit

What code that touched PDT needs to do now:

1. Stop reading the removed fields. A direct lookup such as account["daytrade_count"] fails outright when the key is absent. Generated SDK models may instead return an empty value or fail during deserialisation, depending on the client and its version. Search your codebase for every field in the table above and remove the reads, rather than wrapping them in defaults that silently return zero.

2. Delete guards built on day trade counts. Logic of the form “if the day trade count is at the limit, skip this order” is now checking a number that does not exist. At best it is dead code; at worst a defaulted zero or a permanently true condition changes behaviour without anyone noticing.

3. Stop writing dtbp_check. A PATCH /v2/account/configurations that sets it is sending a removed field. Remove it from configuration code and from any infrastructure-as-code that manages account settings.

4. Use buying_power where you used DTBP, as Alpaca’s blog directs, and read Alpaca’s GET /v2/account reference for what the current buying power fields mean. Do not carry over assumptions from the day-trading buying power field.

5. Handle the order-time rejection generically. Because the pre-trade check’s error is not documented in a form we could find, do not write a handler that only recognises 40310100. Log the full code and message of every rejected order — the pattern in Alpaca API 403 Forbidden — and let the message tell you what happened.

6. Retire the old tutorials. Internal runbooks, prompts for an AI assistant, and comments explaining the day trade limit are now wrong. An assistant or MCP server working from stale instructions will confidently apply a rule that no longer exists.

This is an instance of a broader problem covered in API versioning and breaking changes: a field disappearing is the kind of change that tests against a recorded response never catch. A scheduled contract test against the real paper endpoint would have flagged it as soon as the fields disappeared.

FAQ

Does the Pattern Day Trader rule still apply on Alpaca?

No. Alpaca states it has lifted the Pattern Day Trader rule in production for Trading API users and Broker API partners, following FINRA’s amendment of Rule 4210, effective June 4, 2026. It was replaced by an intraday margin framework, which has its own buying power, margin calls and pre-trade checks.

Which Alpaca API fields were removed with the PDT rule?

Alpaca’s 2026-06-03 changelog deprecated daytrade_count and daytrading_buying_power on the account and dtbp_check on account configurations, with removal on 2026-07-06. Alpaca’s blog also names pattern_day_trader, last_daytrade_count and last_daytrading_buying_power, and says to use buying_power instead.

What does Alpaca error 40310100 mean now?

It was the PDT protection rejection, “trade denied due to pattern day trading protection”, documented in Alpaca’s error guide before the rule was retired. Alpaca says all PDT-based restrictions have been removed, so the code should be historical. Whether it can still be returned after June 4, 2026 is not confirmed, and we did not find it in the API reference.

Can Alpaca still reject an order for margin reasons after the PDT removal?

Yes. Alpaca’s intraday margin framework includes pre-trade checks that reject orders that would put the account into a margin deficit. We did not find the error code for that rejection documented, so log the full code and message of any rejected order, and check Alpaca’s intraday margin page for the current figures.