Alpaca¶
US equities and crypto market data from Alpaca Markets.
Source ID¶
Credentials¶
Get your credentials at Alpaca.
Ticker Format¶
Standard US equity ticker symbols:
| Example | Instrument |
|---|---|
AAPL |
Apple Inc. |
MSFT |
Microsoft Corp. |
SPY |
S&P 500 ETF |
BTC/USD |
Bitcoin (crypto) |
ETH/USD |
Ethereum (crypto) |
Supported Intervals¶
1m, 5m, 15m, 30m, 1h, 1d, 1w, 1M
Parameters¶
| Parameter | Values | Default | Description |
|---|---|---|---|
dtype |
"bars", "trades", "quotes" |
"bars" |
Data type |
assetclass |
"equity", "crypto" |
"equity" |
Asset class |
feed |
"iex", "sip" |
"iex" |
Data feed (SIP requires paid plan) |
Rate limits
Alpaca allows 200 API calls per minute. Aurastream handles rate limiting and retries automatically, including exponential backoff. Large ticker lists are batched (50 per request by default).
Examples¶
US equities (daily)¶
response = requests.post(URL, headers=HEADERS, json={
"tickerlist": ["AAPL", "MSFT", "GOOGL", "AMZN"],
"start": "2025-01-01",
"end": "2025-06-01",
"interval": "1d",
"source": "alpaca",
"credentials": {
"api_key": "YOUR_ALPACA_KEY",
"secret_key": "YOUR_ALPACA_SECRET"
}
})