# Alpaca trading API

Independent and unofficial. Not affiliated with or endorsed by any broker or platform named here. Educational only: nothing here is advice, and nothing here recommends a broker or a trade.

This is the markdown version of https://openbrokerapi.com/brokers/alpaca, written from the same records as that page.

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.

US stock, ETF, options and crypto broker, not CFDs or FX: REST Trading API and Market Data API with WebSocket streams, paper trading on its own host.

- Kind: Broker API
- Newest reading: 2026-11-30
- Official documentation: [docs.alpaca.markets](https://docs.alpaca.markets/)
- Everything recorded for Alpaca, as one JSON file: https://openbrokerapi.com/data/brokers/alpaca.json
- Quickstart, key to first call: https://openbrokerapi.com/brokers/alpaca/quickstart

## Alpaca API rate limits and allowances

One record per limit. The scope is part of the limit: a figure without its scope is not a figure you can pace against.

- client_order_id length: 128 characters
  - Scope: POST /v2/orders and PATCH /v2/orders/{order_id}
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/openapi/trading-api.json), checked 2026-11-30.
  - Note: From the CreateOrderRequest and PatchOrderRequest schemas.
- Crypto order size: 200,000 US dollars notional per order
  - Scope: Crypto spot orders, buy or sell
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/crypto-trading.md), checked 2026-11-30.
  - Note: The Crypto Spot Trading page: each order is limited to 200,000 US dollars in notional value.
- Market data historical API, Basic plan: 200 requests per minute
  - Scope: Market Data API historical calls, Basic (free) plan
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/about-market-data-api.md), checked 2026-11-30.
  - Note: The About Market Data API page: Historical API limit of 200 calls per minute on Basic, with IEX real time data and stock history since 2016 limited to data 15 minutes old.
- Market data points per page: 10,000 data points per page
  - Scope: Market Data API historical bars, trades and quotes, counted across all symbols
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/openapi/market-data-api.json), checked 2026-11-30.
  - Note: The limit query parameter: default 1000, maximum 10000, counted across every symbol in the request. Pages continue with next_page_token.
- Market data historical API, Algo Trader Plus: 10,000 requests per minute
  - Scope: Market Data API historical calls, Algo Trader Plus plan (99 US dollars a month)
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/about-market-data-api.md), checked 2026-11-30.
  - Note: The About Market Data API page: Historical API limit of 10,000 calls per minute on Algo Trader Plus.
- GTC order age: 90 days
  - Scope: Orders with time in force gtc
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/orders-at-alpaca.md), checked 2026-11-30.
  - Note: The Placing Orders page: GTC orders are cancelled automatically 90 days after creation, the date shown in expires_at, by a job that runs at 4:15 pm ET.
- Trading API request rate: HTTP 429 above the limit, with X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers on replies; no figure on the pages opened
  - Scope: Trading API, per account
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/openapi/trading-api.json), checked 2026-11-30.
  - Note: The Trading API OpenAPI document gives the 429 reply and the three headers. None of the Trading API pages opened on 30 Nov 2026 prints a number, so this site records none.
- Market data WebSocket authentication timeout: 10 seconds
  - Scope: Market data WebSocket, from connecting to the auth message
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/streaming-market-data.md), checked 2026-11-30.
  - Note: Error 404 auth timeout where no auth message arrives in time.
- Market data WebSocket connections: Depends on the subscription; 1 for many subscriptions and with none. A second connection is answered with error 406 connection limit exceeded
  - Scope: Market data WebSocket, per account
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/streaming-market-data.md), checked 2026-11-30.
  - Note: The WebSocket Stream page gives no table of figures by plan.
- Market data WebSocket symbols, Basic plan: 30 symbol subscriptions
  - Scope: Market data WebSocket, US equities, Basic (free) plan; Algo Trader Plus is unlimited
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/about-market-data-api.md), checked 2026-11-30.
  - Note: The About Market Data API page: up to 30 WebSocket symbol subscriptions on Basic for equities, unlimited on Algo Trader Plus; for options 200 quote subscriptions on Basic and 1,000 on Algo Trader Plus. Over the limit the stream answers error 405.

[Alpaca API rate limits in full](https://openbrokerapi.com/brokers/alpaca/rate-limits), with the related error codes.

## Access, authentication and streaming

- How you get a key: Sign up on Alpaca's site with an email address for a Paper Only Account, which gives API access and a dashboard. A paper account has its own API keys, separate from any live account, and the dashboard shows the paper base address. Alpaca's pages do not print the menu steps that generate a key.
  - Status: verified. Source: [Alpaca docs: Paper Trading](https://docs.alpaca.markets/us/docs/paper-trading.md), checked 2026-11-30.
  - Status: verified. Source: [Alpaca docs: About Trading API](https://docs.alpaca.markets/us/docs/trading-api.md), checked 2026-11-30.
- Who can use it: Paper Only Account: anyone, anywhere, with an email address. Live brokerage accounts: individual taxable accounts and business accounts (corporations, LLCs and partnerships, with a 30,000 US dollar minimum deposit), for people and entities from around the world; retirement accounts are not supported. Live accounts are opened as margin accounts; margin trading and short selling need 2,000 US dollars or more of equity. Crypto trading is open in select international and some US jurisdictions.
  - Status: verified. Source: [Alpaca docs: Trading Account](https://docs.alpaca.markets/us/docs/account-plans.md), checked 2026-11-30.
  - Status: verified. Source: [Alpaca docs: Crypto Spot Trading](https://docs.alpaca.markets/us/docs/crypto-trading.md), checked 2026-11-30.
- Demo: Yes: paper trading, a real time simulation on its own host, https://paper-api.alpaca.markets, with its own API keys. New paper accounts start with 100,000 US dollars by default; the dashboard can open and delete paper accounts. Fills are simulated from real time quotes against the NBBO; market impact, slippage from latency, queue position, regulatory fees and dividends are not modelled, and about one order in ten gets a partial fill of random size. A Paper Only Account gets IEX data only.
  - Status: verified. Source: [Alpaca docs: Paper Trading](https://docs.alpaca.markets/us/docs/paper-trading.md), checked 2026-11-30.
- Authentication: Two headers on every request, APCA-API-KEY-ID and APCA-API-SECRET-KEY, or HTTP Basic with the key id as the user name and the secret as the password. Live and paper credentials are separate and neither works on the other host. OAuth 2.0 client credentials are documented for the Broker API and marked not yet available for the Trading API.
  - Status: verified. Source: [Alpaca docs: Authentication](https://docs.alpaca.markets/us/docs/authentication.md), checked 2026-11-30.
- Streaming: Two WebSocket streams. Account events: wss://paper-api.alpaca.markets/stream and wss://api.alpaca.markets/stream, where a client sends an auth message, then a listen message for the trade_updates stream, and receives one message per order event (new, fill, partial_fill, canceled, expired, replaced and the rest). Market data: wss://stream.data.alpaca.markets/{version}/{feed}, with feeds v2/iex, v2/sip, v2/delayed_sip, v1beta1/boats and v1beta1/overnight for stocks, v1beta3/crypto/{loc} for crypto and v2/test outside market hours, where a client authenticates within 10 seconds, then subscribes by channel (trades, quotes, bars and others) and symbol. Messages are JSON arrays, or MessagePack where the client asks. The connection limit depends on the subscription and is 1 for many; a second connection gets error 406.
  - Status: verified. Source: [Alpaca docs: Websocket Streaming](https://docs.alpaca.markets/us/docs/websocket-streaming.md), checked 2026-11-30.
  - Status: verified. Source: [Alpaca docs: WebSocket Stream (market data)](https://docs.alpaca.markets/us/docs/streaming-market-data.md), checked 2026-11-30.
  - Status: verified. Source: [Alpaca docs: Real-time Stock Data](https://docs.alpaca.markets/us/docs/real-time-stock-pricing-data.md), checked 2026-11-30.
  - Status: verified. Source: [Alpaca docs: Real-time Crypto Data](https://docs.alpaca.markets/us/docs/real-time-crypto-pricing-data.md), checked 2026-11-30.
- 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.
  - Status: verified. Source: [Alpaca Trading API OpenAPI document](https://docs.alpaca.markets/openapi/trading-api.json), checked 2026-11-30.
  - Status: verified. Source: [Alpaca docs: About Market Data API](https://docs.alpaca.markets/us/docs/about-market-data-api.md), checked 2026-11-30.
- History depth: Stock history since 2016 on both market data plans; the Basic plan is limited to data at least 15 minutes old for SIP, so a query for recent SIP trades or quotes needs Algo Trader Plus. Historical requests page at up to 10,000 data points per page, 1,000 by default, counted across all symbols. The market calendar covers 1970 to 2029.
  - Status: verified. Source: [Alpaca docs: About Market Data API](https://docs.alpaca.markets/us/docs/about-market-data-api.md), checked 2026-11-30.
  - Status: verified. Source: [Alpaca docs: Market Data FAQ](https://docs.alpaca.markets/us/docs/market-data-faq.md), checked 2026-11-30.
  - Status: verified. Source: [Alpaca Market Data API OpenAPI document](https://docs.alpaca.markets/openapi/market-data-api.json), checked 2026-11-30.
  - Status: verified. Source: [Alpaca reference: Get US Market Calendar](https://docs.alpaca.markets/us/reference/legacycalendar.md), checked 2026-11-30.
- own_api: Alpaca publishes its own REST Trading API (v2, with paper and live hosts), its own Market Data API on data.alpaca.markets and WebSocket streams for both, with OpenAPI documents for each. The Broker API is a separate business to business product and is outside this site's scope.
  - Status: verified. Source: [Alpaca docs: About Trading API](https://docs.alpaca.markets/us/docs/trading-api.md), checked 2026-11-30.
  - Status: verified. Source: [Alpaca docs: SDKs and Tools](https://docs.alpaca.markets/us/docs/sdks-and-tools.md), checked 2026-11-30.
  - Status: verified. Source: [Alpaca docs: Authentication](https://docs.alpaca.markets/us/docs/authentication.md), checked 2026-11-30.

## Alpaca API endpoints

25 documented endpoints. [Grouped by what they do](https://openbrokerapi.com/brokers/alpaca/endpoints).

- [GET /v1beta3/crypto/{loc}/bars](https://openbrokerapi.com/brokers/alpaca/endpoints/crypto-bars): Historical bars for a list of crypto pairs at one location, paged. The one market data call the FAQ says needs no authentication for history.
- [GET /v2/account](https://openbrokerapi.com/brokers/alpaca/endpoints/account): The account behind the keys: status, cash, equity, buying power and margin figures. Start here to prove the keys work.
- [GET /v2/account/activities](https://openbrokerapi.com/brokers/alpaca/endpoints/account-activities): The account's activity log: fills (FILL) and non trade activities such as dividends, fees and journals, paged.
- [GET /v2/account/portfolio/history](https://openbrokerapi.com/brokers/alpaca/endpoints/portfolio-history): The account's equity and profit or loss over time, as parallel arrays of timestamps and values.
- [GET /v2/assets](https://openbrokerapi.com/brokers/alpaca/endpoints/assets): Lists assets Alpaca knows: symbol, exchange, class and whether each is tradable, marginable, shortable and fractionable.
- [GET /v2/assets/{symbol_or_asset_id}](https://openbrokerapi.com/brokers/alpaca/endpoints/asset): One asset by symbol or asset id, with its dealing flags. 404 where it is not found.
- [GET /v2/calendar](https://openbrokerapi.com/brokers/alpaca/endpoints/calendar): The US market calendar: each trading day with its open and close times and settlement date, from 1970 to 2029.
- [GET /v2/clock](https://openbrokerapi.com/brokers/alpaca/endpoints/clock): The US market clock: the current time, whether the market is open, and the next open and close.
- [DELETE /v2/orders](https://openbrokerapi.com/brokers/alpaca/endpoints/delete-orders): Cancels every open order on the account. Replies 207 with one status per order.
- [GET /v2/orders](https://openbrokerapi.com/brokers/alpaca/endpoints/orders): Lists orders: open ones by default, or closed or all, newest first, with paging by time or by order id.
- [POST /v2/orders](https://openbrokerapi.com/brokers/alpaca/endpoints/post-orders): Places an order: market, limit, stop, stop limit or trailing stop, alone or as a bracket, OCO, OTO or multi leg order. The reply is the Order with its id.
- [GET /v2/orders:by_client_order_id](https://openbrokerapi.com/brokers/alpaca/endpoints/order-by-client-order-id): One order by the client_order_id you gave it.
- [DELETE /v2/orders/{order_id}](https://openbrokerapi.com/brokers/alpaca/endpoints/delete-order): Cancels one open order. 204 with no body on success; 422 where the order can no longer be cancelled.
- [GET /v2/orders/{order_id}](https://openbrokerapi.com/brokers/alpaca/endpoints/order): One order by its id, whatever its state: status, filled quantity and average fill price.
- [PATCH /v2/orders/{order_id}](https://openbrokerapi.com/brokers/alpaca/endpoints/patch-order): Replaces an open order with new quantity, prices, time in force or trail. The reply is a new Order with a new id.
- [GET /v2/positions](https://openbrokerapi.com/brokers/alpaca/endpoints/positions): Every open position on the account: symbol, quantity, side, average entry, market value and unrealised profit or loss.
- [DELETE /v2/positions/{symbol_or_asset_id}](https://openbrokerapi.com/brokers/alpaca/endpoints/delete-position): Closes one open position, in full or in part, by placing the closing order. The reply is that order.
- [GET /v2/positions/{symbol_or_asset_id}](https://openbrokerapi.com/brokers/alpaca/endpoints/position): One open position, by symbol or by asset id.
- [GET /v2/stocks/bars](https://openbrokerapi.com/brokers/alpaca/endpoints/stock-bars): Historical bars (OHLC with volume, trade count and VWAP) for a list of stock symbols, sorted by symbol then time, paged.
- [GET /v2/stocks/quotes/latest](https://openbrokerapi.com/brokers/alpaca/endpoints/stock-latest-quotes): The latest best bid and ask for a list of stock symbols: one quote per symbol.
- [GET /v2/stocks/snapshots](https://openbrokerapi.com/brokers/alpaca/endpoints/stock-snapshots): For each symbol, the latest trade, latest quote, current minute bar, current daily bar and previous daily bar in one reply.
- [GET /v2/stocks/trades](https://openbrokerapi.com/brokers/alpaca/endpoints/stock-trades): Historical trades (prints) for a list of stock symbols, sorted by symbol then time, paged.
- [GET /v2/watchlists](https://openbrokerapi.com/brokers/alpaca/endpoints/watchlists): Every watchlist on the account, without their assets.
- [POST /v2/watchlists](https://openbrokerapi.com/brokers/alpaca/endpoints/post-watchlists): Creates a watchlist with a name and, optionally, a first set of symbols.
- [GET /v2/watchlists/{watchlist_id}](https://openbrokerapi.com/brokers/alpaca/endpoints/watchlist): One watchlist by id, with its assets.

## Alpaca messages

9 documented messages. They are not HTTP endpoints: none has a method or a path. [Grouped by what they do](https://openbrokerapi.com/brokers/alpaca/messages).

- [auth](https://openbrokerapi.com/brokers/alpaca/messages/auth) (Alpaca WebSocket streams): Authenticates a WebSocket connection with the key id and secret, on the account stream and on the market data stream alike. Sent first, before listen or subscribe.
- [b](https://openbrokerapi.com/brokers/alpaca/messages/bar-message) (Alpaca WebSocket streams): A minute bar for a subscribed symbol, sent just after each minute: open, high, low, close, volume, trade count and VWAP. The same shape arrives as d for daily bars and u for updated bars.
- [listen](https://openbrokerapi.com/brokers/alpaca/messages/listen) (Alpaca WebSocket streams): Asks the account stream to send a named stream, trade_updates being the one the page documents. Each listen message replaces the whole set: send every stream you still want, or an empty list to stop.
- [o](https://openbrokerapi.com/brokers/alpaca/messages/orderbook-message) (Alpaca WebSocket streams): Crypto only: the order book of a subscribed pair. The first message carries the whole book with r true; later ones carry changed levels, and a size of 0 removes a level.
- [q](https://openbrokerapi.com/brokers/alpaca/messages/quote-message) (Alpaca WebSocket streams): The best bid and ask for a subscribed symbol, with sizes and, for stocks, the exchange on each side.
- [subscribe](https://openbrokerapi.com/brokers/alpaca/messages/subscribe) (Alpaca WebSocket streams): Adds symbols to the connection's subscriptions, by channel. The message adds to the current set, so send only what is new; the reply lists everything now subscribed.
- [t](https://openbrokerapi.com/brokers/alpaca/messages/trade-message) (Alpaca WebSocket streams): One trade (print) for a subscribed symbol: price, size, exchange, conditions and a nanosecond timestamp. Crypto trades add the taker side.
- [trade_updates](https://openbrokerapi.com/brokers/alpaca/messages/trade-updates) (Alpaca WebSocket streams): One message per order event on the account: the event name, the whole order object as the REST API returns it, and for fills the price, quantity and resulting position.
- [unsubscribe](https://openbrokerapi.com/brokers/alpaca/messages/unsubscribe) (Alpaca WebSocket streams): Removes symbols from the connection's subscriptions, by channel. The reply is the whole list that remains.

## Alpaca API error codes

26 decoded error codes. [All Alpaca errors](https://openbrokerapi.com/errors/alpaca).

- [400](https://openbrokerapi.com/errors/alpaca/ws-400): The market data stream's error 400, invalid syntax: the message sent could not be parsed.
- [401](https://openbrokerapi.com/errors/alpaca/ws-401): The market data stream's error 401, not authenticated: a message other than auth arrived before the connection was authenticated.
- [402](https://openbrokerapi.com/errors/alpaca/ws-402): The market data stream's error 402, auth failed: the key id and secret were not accepted, or the feed is not in your subscription.
- [403](https://openbrokerapi.com/errors/alpaca/ws-403): The market data stream's error 403, already authenticated: a second auth message on a connection that was already authenticated.
- [404](https://openbrokerapi.com/errors/alpaca/ws-404): The market data stream's error 404, auth timeout: no auth message arrived within the 10 seconds the page allows after connecting.
- [405](https://openbrokerapi.com/errors/alpaca/ws-405): The market data stream's error 405, symbol limit exceeded: the subscribe message would take the connection past the number of symbols the plan allows.
- [406](https://openbrokerapi.com/errors/alpaca/ws-406): The market data stream's error 406, connection limit exceeded: a second connection where the plan allows one.
- [407](https://openbrokerapi.com/errors/alpaca/ws-407): The market data stream's error 407, slow client: the client is not reading messages as fast as the server sends them.
- [409](https://openbrokerapi.com/errors/alpaca/ws-409): The market data stream's error 409, insufficient subscription: the feed or channel asked for is not in the plan.
- [410](https://openbrokerapi.com/errors/alpaca/ws-410): The market data stream's error 410: the subscribe action named a channel the connected feed does not serve.
- [42210000](https://openbrokerapi.com/errors/alpaca/42210000): The code in the body of a 422 reply.
- [500](https://openbrokerapi.com/errors/alpaca/ws-500): The market data stream's error 500, internal error, on Alpaca's side.
- [HTTP 400](https://openbrokerapi.com/errors/alpaca/400): One of the request's parameters is invalid.
- [HTTP 401 (market data)](https://openbrokerapi.com/errors/alpaca/401-market-data): The Market Data API's shared reply where the authentication headers are missing or invalid.
- [HTTP 403](https://openbrokerapi.com/errors/alpaca/403): Forbidden.
- [HTTP 404](https://openbrokerapi.com/errors/alpaca/404): Not found: an asset by symbol or id, a watchlist by id, or on the market data host a feed that does not exist.
- [HTTP 422](https://openbrokerapi.com/errors/alpaca/422): Unprocessable.
- [HTTP 429](https://openbrokerapi.com/errors/alpaca/429): Too many requests: the rate limit was hit.
- [HTTP 500](https://openbrokerapi.com/errors/alpaca/500): Internal server error on Alpaca's side.
- [HTTP 504](https://openbrokerapi.com/errors/alpaca/504): Gateway timeout, listed among the replies of GET /v2/account/portfolio/history.
- [internal server error](https://openbrokerapi.com/errors/alpaca/stream-internal-server-error): The error_message of an error action on the account stream, which the page says the server sends before closing the connection.
- [order_cancel_rejected](https://openbrokerapi.com/errors/alpaca/stream-order-cancel-rejected): An event on the trade_updates stream: a request to cancel the order was rejected.
- [order_replace_rejected](https://openbrokerapi.com/errors/alpaca/stream-order-replace-rejected): An event on the trade_updates stream: a request to replace the order was rejected.
- [rejected](https://openbrokerapi.com/errors/alpaca/stream-rejected): An event on the trade_updates stream: the order was rejected.
- [unable to open new notional orders while having open closing position orders](https://openbrokerapi.com/errors/alpaca/notional-while-closing): The message the Placing Orders page gives when a notional order is rejected because a closing order on the same position is still open, in the sequences outside market hours that Alpaca stopped accepting from 27 October 2021.
- [unauthorized](https://openbrokerapi.com/errors/alpaca/stream-unauthorized): The status in an authorization message on the account stream: the auth message failed, or a listen message was sent before the connection was authorised (then the message carries action listen).

## Alpaca API SDKs and wrappers

- alpaca-py (Python, Official): Listed on Alpaca's SDK page as its Python SDK.
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/sdks-and-tools.md), checked 2026-11-30.
- alpaca-trade-api-js (JavaScript (Node), Official)
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/sdks-and-tools.md), checked 2026-11-30.
- alpaca-trade-api-csharp (C# (.NET), Official)
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/sdks-and-tools.md), checked 2026-11-30.
- alpaca-trade-api-go (Go, Official)
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/sdks-and-tools.md), checked 2026-11-30.
- alpaca-java (Java, Official)
  - Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/sdks-and-tools.md), checked 2026-11-30.

## Alpaca API: questions and answers

### Does Alpaca have an API?

Unverified. Yes. This register records Alpaca as having its own API (REST (Trading API v2), REST (Market Data API) and WebSocket streaming), with availability marked as active. US stock, ETF, options and crypto broker, not CFDs or FX: REST Trading API and Market Data API with WebSocket streams, paper trading on its own host. No source is recorded against this entry.

- Status: unverified. No source opened.

### Alpaca API key: how do I get one?

Sign up on Alpaca's site with an email address for a Paper Only Account, which gives API access and a dashboard. A paper account has its own API keys, separate from any live account, and the dashboard shows the paper base address.

- Status: verified. Source: [Alpaca docs: Paper Trading](https://docs.alpaca.markets/us/docs/paper-trading.md), checked 2026-11-30.
- Status: verified. Source: [Alpaca docs: About Trading API](https://docs.alpaca.markets/us/docs/trading-api.md), checked 2026-11-30.

### Who can use the Alpaca API?

Paper Only Account: anyone, anywhere, with an email address.

- Status: verified. Source: [Alpaca docs: Trading Account](https://docs.alpaca.markets/us/docs/account-plans.md), checked 2026-11-30.
- Status: verified. Source: [Alpaca docs: Crypto Spot Trading](https://docs.alpaca.markets/us/docs/crypto-trading.md), checked 2026-11-30.

### Alpaca API demo: is there a demo or sandbox?

Yes: paper trading, a real time simulation on its own host, https://paper-api.alpaca.markets, with its own API keys. New paper accounts start with 100,000 US dollars by default; the dashboard can open and delete paper accounts.

- Status: verified. Source: [Alpaca docs: Paper Trading](https://docs.alpaca.markets/us/docs/paper-trading.md), checked 2026-11-30.

### What are the Alpaca API rate limits?

client_order_id length: 128 characters. Scope: POST /v2/orders and PATCH /v2/orders/{order_id}. Crypto order size: 200,000 US dollars notional per order. Scope: Crypto spot orders, buy or sell. Market data historical API, Basic plan: 200 requests per minute. Scope: Market Data API historical calls, Basic (free) plan. Market data points per page: 10,000 data points per page. Scope: Market Data API historical bars, trades and quotes, counted across all symbols. Market data historical API, Algo Trader Plus: 10,000 requests per minute. Scope: Market Data API historical calls, Algo Trader Plus plan (99 US dollars a month). GTC order age: 90 days. Scope: Orders with time in force gtc. Trading API request rate: HTTP 429 above the limit, with X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers on replies; no figure on the pages opened. Scope: Trading API, per account. Market data WebSocket authentication timeout: 10 seconds. Scope: Market data WebSocket, from connecting to the auth message. Market data WebSocket connections: Depends on the subscription; 1 for many subscriptions and with none. A second connection is answered with error 406 connection limit exceeded. Scope: Market data WebSocket, per account. Market data WebSocket symbols, Basic plan: 30 symbol subscriptions. Scope: Market data WebSocket, US equities, Basic (free) plan; Algo Trader Plus is unlimited. As the record words it: 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.

- Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/openapi/trading-api.json), checked 2026-11-30.
- Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/crypto-trading.md), checked 2026-11-30.
- Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/about-market-data-api.md), checked 2026-11-30.
- Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/openapi/market-data-api.json), checked 2026-11-30.
- Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/orders-at-alpaca.md), checked 2026-11-30.
- Status: verified. Source: [docs.alpaca.markets](https://docs.alpaca.markets/us/docs/streaming-market-data.md), checked 2026-11-30.

### How does Alpaca API authentication work?

Two headers on every request, APCA-API-KEY-ID and APCA-API-SECRET-KEY, or HTTP Basic with the key id as the user name and the secret as the password. Live and paper credentials are separate and neither works on the other host.

- Status: verified. Source: [Alpaca docs: Authentication](https://docs.alpaca.markets/us/docs/authentication.md), checked 2026-11-30.

### Does the Alpaca API support streaming?

Two WebSocket streams.

- Status: verified. Source: [Alpaca docs: Websocket Streaming](https://docs.alpaca.markets/us/docs/websocket-streaming.md), checked 2026-11-30.
- Status: verified. Source: [Alpaca docs: WebSocket Stream (market data)](https://docs.alpaca.markets/us/docs/streaming-market-data.md), checked 2026-11-30.
- Status: verified. Source: [Alpaca docs: Real-time Stock Data](https://docs.alpaca.markets/us/docs/real-time-stock-pricing-data.md), checked 2026-11-30.
- Status: verified. Source: [Alpaca docs: Real-time Crypto Data](https://docs.alpaca.markets/us/docs/real-time-crypto-pricing-data.md), checked 2026-11-30.

### How much history does the Alpaca API return?

Stock history since 2016 on both market data plans; the Basic plan is limited to data at least 15 minutes old for SIP, so a query for recent SIP trades or quotes needs Algo Trader Plus.

- Status: verified. Source: [Alpaca docs: About Market Data API](https://docs.alpaca.markets/us/docs/about-market-data-api.md), checked 2026-11-30.
- Status: verified. Source: [Alpaca docs: Market Data FAQ](https://docs.alpaca.markets/us/docs/market-data-faq.md), checked 2026-11-30.
- Status: verified. Source: [Alpaca Market Data API OpenAPI document](https://docs.alpaca.markets/openapi/market-data-api.json), checked 2026-11-30.
- Status: verified. Source: [Alpaca reference: Get US Market Calendar](https://docs.alpaca.markets/us/reference/legacycalendar.md), checked 2026-11-30.

### Is there a Python library for the Alpaca API?

This register lists one Python library for the Alpaca API. alpaca-py (official, Python): Listed on Alpaca's SDK page as its Python SDK.

- Status: verified. Source: [alpaca-py](https://docs.alpaca.markets/us/docs/sdks-and-tools.md), checked 2026-11-30.

[Alpaca API questions, each answered in a sentence or two](https://openbrokerapi.com/answers/alpaca).

## Licence and how to cite

The limit records on this page come from the limits register, which is CC BY 4.0 (https://openbrokerapi.com/data/limits.json). Everything else on it comes from records that are all rights reserved. This file is the page itself, at its own address, in another format, and it is not part of the CC BY 4.0 downloads listed at https://openbrokerapi.com/data.

Cite as: Alpaca trading API. Broker API Hub, https://openbrokerapi.com/brokers/alpaca, newest check 2026-11-30.

Where you rely on a single figure, cite the source and the checked date printed beside it as well. Where this page and a broker's own documentation differ, the documentation wins.
