alpaca-trade-api
Alpaca API python client
Decision gist · record as of 2026-08-14
No, not for new projects. The package is abandoned and explicitly superseded by Alpaca-py. While it has low install friction and no known vulnerabilities, the lack of active maintenance, unclear license, and the maintainers' own recommendation to migrate make it unsuitable for new development. Use only if maintaining legacy code that cannot yet be ported to Alpaca-py.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.7 or above.
- API key from Alpaca (https://app.alpaca.markets/signup) and environment variables APCA_API_BASE_URL and APCA_API_DATA_URL must be set or passed directly to REST().
- Low install friction with a pure-Python wheel and ten runtime dependencies.
License · maintenance · safety
(unclear) — License treatment is unclear—no SPDX identifier or raw license text is available in the metadata. Before adopting this package, verify the actual license terms in the repository to ensure compatibility with your project.
last release 2024-01-12 (945 days) · last repo commit 2024-12-02 · 1,883 stars · archived
0 known vulnerabilities (OSV.dev, 2026-08-14) · 655,225 downloads/mo, #5,516 on PyPI
Alternatives
Verify before relying
from alpaca_trade_api.rest import REST, TimeFrame
api = REST()
bars = api.get_bars("AAPL", TimeFrame.Hour, "2021-06-08", "2021-06-08", adjustment='raw')
print(bars.df)- Current state of the archived repository and whether security patches are still applied
- Compatibility of this SDK with the current Alpaca API v2 after end-of-2022 maintenance window
- Whether the websockets>=9.0 recommendation is a hard requirement or a best practice
What it is and what it does
alpaca-trade-api is a Python client for Alpaca's commission-free trading platform. It wraps the Alpaca REST and streaming APIs, allowing developers to fetch historical market data (bars, quotes, trades), manage trading accounts and portfolios, and stream live market data. The library supports both synchronous REST calls and asynchronous operations via asyncio, with built-in pagination for large data queries.
The package depends on pandas, numpy, requests, websocket-client, websockets, aiohttp, and other utilities for HTTP and data handling. It is designed for rapid algo development but is no longer actively maintained—the maintainers deprecated it in favor of Alpaca-py starting in 2023 and committed to maintenance only through end-2022. The repository is now archived, making this a legacy choice for new projects.
Use it for
- Fetch historical OHLCV bars and quotes for backtesting trading strategies
- Stream real-time market data and execute trades programmatically against a live or paper trading account
- Build automated trading bots that monitor account positions and rebalance portfolios on schedule
- Retrieve historical trade data and account statements for analysis and reporting
- Prototype trading algorithms with support for custom timeframes and data pagination
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No, not for new projects.
The package is abandoned and explicitly superseded by Alpaca-py. While it has low install friction and no known vulnerabilities, the lack of active maintenance, unclear license, and the maintainers' own recommendation to migrate make it unsuitable for new development. Use only if maintaining legacy code that cannot yet be ported to Alpaca-py.
Install
alpaca-trade-api on PyPI
Before you install
Low install friction with a pure-Python wheel and ten runtime dependencies. However, the package is abandoned as of end-2022; the maintainers explicitly recommend migrating to the newer Alpaca-py SDK. Last commit was 2024-12-02, but the repository is archived and no active development is expected.
Requires Python 3.7 or above. API key from Alpaca (https://app.alpaca.markets/signup) and environment variables APCA_API_BASE_URL and APCA_API_DATA_URL must be set or passed directly to REST().
License in practice
License treatment is unclear—no SPDX identifier or raw license text is available in the metadata. Before adopting this package, verify the actual license terms in the repository to ensure compatibility with your project.
Quickstart
from alpaca_trade_api.rest import REST, TimeFrame
api = REST()
bars = api.get_bars("AAPL", TimeFrame.Hour, "2021-06-08", "2021-06-08", adjustment='raw')
print(bars.df)
Verify before relying
- Current state of the archived repository and whether security patches are still applied
- Compatibility of this SDK with the current Alpaca API v2 after end-of-2022 maintenance window
- Whether the websockets>=9.0 recommendation is a hard requirement or a best practice
Package facts
| License | Not declared unclear |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 10 packagespandasnumpyrequestsurllib3websocket-clientwebsocketsmsgpackaiohttpPyYAMLdeprecation |
| Maintenance | Abandoned 945 days since the last release |
| Last repo commit | repository archived |
| First released | |
| Downloads | 655,225 / month, #5,516 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: alpaca_trade_api-3.2.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “alpaca trading api python client”
- alpaca-trade-apiPython client library for the Alpaca Commission Free Trading API,…
- alpaca-pyAlpaca-py is the official Python SDK for interacting with Alpaca's…
- lumibotLumibot is a Python framework for building, backtesting, and running…
Give your agent the search over MCP, or paste the wish link into any chat.
More Internet packages
Botocore provides low-level, data-driven access to Amazon Web Services APIs, serving as the foundation for the AWS CLI and boto3 libraries.
Install it if you need programmatic access to AWS services.
Provides an async client for AWS services using botocore and aiohttp, allowing you to call AWS APIs asynchronously within asyncio-based applications.
Install it if you need to call AWS services from async Python code; it is the standard way to do so.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides a platform-independent file locking mechanism to coordinate access to files across processes and threads.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides common Protocol Buffer message definitions used across Google Cloud APIs, enabling Python clients to interact with Google services.
See also alpaca-py · snaptrade-python-sdk · kiteconnect · growwapi · databento · pandas_market_calendars · dhanhq · exchange_calendars · yahooquery · metatrader5