alpaca-data

Download historical and real-time market data for stocks, crypto, and options via the Alpaca API.

Updated Aug 13, 2026
One-click install
npx skills add https://github.com/Martino17x/Sentinel-Invest --skill alpaca-data-martino17x
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: alpaca-data
Source: https://github.com/Martino17x/Sentinel-Invest/tree/main/.agents/skills/alpaca-data
Command: npx skills add https://github.com/Martino17x/Sentinel-Invest --skill alpaca-data-martino17x

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires alpaca-py, pandas, requests, and includes scripts (resource) and references (resource) components.

What problem does it solve? Accessing US market data (stocks, crypto, options) requires navigating API authentication, rate limits, pagination, and feed tiers. This Skill provides ready-to-use Python code and scripts to fetch historical and real-time data from the Alpaca Market Data API without figuring out the SDK from scratch. ## Core Features & Use Cases - Historical Stock Data: Retrieve OHLCV bars, quotes, trades, snapshots, and latest prices for 5000+ US stocks using the alpaca-py SDK or REST scripts with automatic pagination. - Crypto & Options Data: Fetch crypto bars without API keys, and download option contracts filtered by expiration, strike, and type. - Download Scripts: Command-line scripts export stock bars, crypto bars, and option chains directly to CSV files with rate-limit handling. - Use Case: Download one year of daily bars for AAPL and GOOGL to CSV, then pull the full AAPL option chain for the next 90 days to analyze strikes and open interest. ## Quick Start Ask the assistant to download the last 365 days of daily bars for AAPL and MSFT using the Alpaca data scripts and save them as CSV files.

Frequently Asked Questions about alpaca-data

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I download historical stock data from Alpaca in Python?▼

Use the alpaca-py SDK with StockHistoricalDataClient and StockBarsRequest, specifying symbols, timeframe, start and end dates, and the iex feed for the free tier. Alternatively, run the download_stock_bars.py script with --symbols, --days, and --output flags to save CSV files.

Does Alpaca crypto data require API keys?▼

No, crypto historical data from Alpaca does not require API keys. You can create a CryptoHistoricalDataClient without credentials and request bars for pairs like BTC/USD and ETH/USD immediately.

What is the difference between Alpaca IEX and SIP data feeds?▼

IEX is the free tier covering roughly 2.5% of volume from a single exchange with about 5 years of history. SIP is a paid feed consolidating all US exchanges with about 7 years of history. Free accounts are limited to IEX only.

How do I get option contracts for a stock using Alpaca?▼

Use OptionContractsRequest with the underlying symbol and filters like expiration_date_gte, expiration_date_lte, strike_price_gte, strike_price_lte, and type (call or put). The download_options.py script automates this and exports results to CSV.

Why am I getting 429 errors from the Alpaca API?▼

A 429 error means you exceeded the rate limit, which is 200 requests per minute on the free plan. Wait before retrying, cache historical data since it does not change, batch multiple symbols per request, and use limit=10000 to reduce total calls.

Alpaca vs Alpha Vantage for market data, which should I use?▼

Choose Alpaca for US stocks, crypto, and options with intraday data and a Python SDK. Choose Alpha Vantage for technical indicators and forex. Alpaca's free tier offers IEX stock data, while Alpha Vantage limits free usage to 25 requests per day.