Broker API HubMenu

Broker API

Alpaca API: questions and answers

7 questions about the Alpaca API, each answered from the Alpaca record on this site and nothing else. 1 of the answers rests on a record labelled unverified.

Independent and unofficialNewest check Official documentation

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.

An answer here is the record's own wording, cut at the end of a sentence, or a list of names read from records. An answer that opens with the word Unverified has no dated source behind it. Where this page and the provider's own documentation differ, the documentation wins. Nothing here recommends a broker.

Alpaca API questions

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.

Unverifiedno source opened

The Alpaca API record. The same question for every record.

Does Alpaca have a demo or paper trading API?

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.

Alpaca docs: Paper Tradingchecked

The Alpaca record's full wording. The same question for every record.

What are Alpaca's API rate limits?

The limits register holds 10 limit records for the Alpaca API, each with its own scope: client_order_id length, Crypto order size, Market data historical API, Basic plan, Market data points per page, Market data historical API, Algo Trader Plus, GTC order age, Trading API request rate, Market data WebSocket authentication timeout, Market data WebSocket connections and Market data WebSocket symbols, Basic plan.

docs.alpaca.marketschecked docs.alpaca.marketschecked docs.alpaca.marketschecked docs.alpaca.marketschecked docs.alpaca.marketschecked docs.alpaca.marketschecked

Alpaca API rate limits in full, each with its scope. The same question for every record.

How do I authenticate with the Alpaca API?

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.

Alpaca docs: Authenticationchecked

The Alpaca record's full wording. The same question for every record.

Does Alpaca support streaming or WebSocket prices?

Two WebSocket streams.

Alpaca docs: Websocket Streamingchecked Alpaca docs: WebSocket Stream (market data)checked Alpaca docs: Real-time Stock Datachecked Alpaca docs: Real-time Crypto Datachecked

The Alpaca record's full wording. The same question for every record.

Is there an official Python library for Alpaca?

The Alpaca record marks one Python library as official: alpaca-py.

alpaca-pychecked

Every library in the Alpaca record. The same question for every record.

What does Alpaca error rejected mean?

An event on the trade_updates stream: the order was rejected. The page lists it among the less common events and gives it a timestamp field.

docs.alpaca.marketschecked

Alpaca error rejected: the meaning in full and what to do. The same question for every record.

Not recorded here

The Alpaca record cannot answer these questions yet, so they are not asked above. That is a gap in this dataset. It says nothing either way about Alpaca.

Where to go next

Other brokers

In order of name. The order is not a ranking.

Sections