Broker API HubMenu

Alpaca API rate limits

What is recorded about how fast you may call the Alpaca API: 10 limit records, the wording from the record and 1 related error code.

Independent and unofficialNewest check

Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.

Recorded limits

One record per limit. The scope is part of the limit: a figure is only useful once you know whether it applies to a key, an account, a session or an address.

LimitValueScopeSource
client_order_id length128POST /v2/orders and PATCH /v2/orders/{order_id}docs.alpaca.marketschecked
Crypto order size200,000Crypto spot orders, buy or selldocs.alpaca.marketschecked
Market data historical API, Basic plan200Market Data API historical calls, Basic (free) plandocs.alpaca.marketschecked
Market data points per page10,000Market Data API historical bars, trades and quotes, counted across all symbolsdocs.alpaca.marketschecked
Market data historical API, Algo Trader Plus10,000Market Data API historical calls, Algo Trader Plus plan (99 US dollars a month)docs.alpaca.marketschecked
GTC order age90Orders with time in force gtcdocs.alpaca.marketschecked
Trading API request rateHTTP 429 above the limit, with X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers on replies; no figure on the pages openedTrading API, per accountdocs.alpaca.marketschecked
Market data WebSocket authentication timeout10Market data WebSocket, from connecting to the auth messagedocs.alpaca.marketschecked
Market data WebSocket connectionsDepends on the subscription; 1 for many subscriptions and with none. A second connection is answered with error 406 connection limit exceededMarket data WebSocket, per accountdocs.alpaca.marketschecked
Market data WebSocket symbols, Basic plan30Market data WebSocket, US equities, Basic (free) plan; Algo Trader Plus is unlimiteddocs.alpaca.marketschecked

Rate limits, as the record words them

Rate limits, as worded

The Trading API OpenAPI document gives HTTP 429 for too many requests, with X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers on replies, and no figure on the pages opened. The Market Data API pages give figures by plan: the historical API allows 200 calls a minute on the free Basic plan and 10,000 calls a minute on Algo Trader Plus (99 US dollars a month). Basic allows up to 30 WebSocket symbol subscriptions for equities and 200 quote subscriptions for options; Algo Trader Plus has unlimited equity subscriptions and 1,000 option quote subscriptions.

Alpaca Trading API OpenAPI documentchecked Alpaca docs: About Market Data APIchecked

Error codes that concern limits

These are the decoded Alpaca errors whose code or meaning names a rate limit, an allowance or throttling. Each row links to the full meaning and the fix.

CodeHTTP statusMeaning, first sentenceSource
HTTP 429429Too many requests: the rate limit was hit.docs.alpaca.marketschecked

Pacing and backoff, in general

This part is general advice and says nothing about Alpaca in particular. The figures that apply are the recorded ones above, and the provider's own documentation is the authority.

Pace before you are refused. Work out the gap between requests that keeps you under the limit, then leave a margin, because a limit counted by a provider's clock will not line up exactly with yours. Spread calls evenly: a burst at the start of each window is the usual way to hit a limit while staying under it on average. The rate limit calculator checks a polling plan against a limit and gives the shortest interval that fits.

When a request is refused for rate, stop sending and wait. Double the wait after each refusal in a row, add a small random amount so that several programs do not retry together, and cap the number of attempts. If the reply names how long to wait, use that figure in place of your own.

Take extra care with dealing requests. A refused or unanswered order may or may not have gone through, so check the state of the order before you send it again. Cache what does not change, such as instrument details and history you have already downloaded, and prefer a stream to polling where one is offered.

Where to go next

Other brokers: Axi, Bitget, Capital.com, CMC Markets, Deriv, Dukascopy, eToro, Exness, FOREX.com, FXCM, FxPro, IG, Interactive Brokers, OANDA, Pepperstone, Saxo, Swissquote, ThinkMarkets, Tickmill, Trading 212, XTB.