Alpaca-py Documentation#

The official Python SDK for Alpaca's APIs.

GitHub stars

PyPI version

PyPI pyversions



Learn more about what Alpaca-py offers and how it’s different from the previous SDK on the Getting Started page.



The Broker API allows you to build the full brokerage experiences for your end users around account opening, funding and trading. Learn more on the Broker page.

Market Data#


The Market Data API gives you access to real time and historical data for equities, crypto and options(beta). Learn more on the Market Data page.



Trade stocks & crypto with Alpaca’s easy to use Trading API. Paper trading is free and available to all Alpaca users. Learn more on the Trading page.

Discover Python Finance Libraries#

Here are some libraries that work well with Alpaca-py.

Trading and Backtesting

  • Backtrader - Python Backtesting library for trading strategies.

  • Vectorbt - Find your trading edge, using a powerful toolkit for backtesting, algorithmic trading, and research.

  • LiuAlgoTrader - A scalable, multi-process ML-ready framework for effective algorithmic trading.

  • FinRL - The first open-source project for financial reinforcement learning.

Portfolio Analytics

  • Pyfolio - Portfolio and risk analytics in Python.

  • FinQuant - A program for financial portfolio management, analysis and optimisation.

FinTech Integrations

  • Plaid - Connect user banking information.

  • Onfido - Identity verification / KYC.