# Alpaca-py (Alpaca Python SDK)

The Official Python SDK for Alpaca API

Repository: https://github.com/alpacahq/alpaca-py
Canonical: https://ross.abutalabs.com/products/alpaca-python-sdk
Homepage: https://alpaca.markets/sdks/python/getting_started.html
Language: Python
License: Apache-2.0
License Family: permissive
Topics: algorithmic-trading, brokerage, crypto, finance, market-data, python, trading, alpaca, alpaca-api, equities, options, quant, stock-trading, quantitative-finance, algotrading
Last push: 2026-08-24T12:35:09+00:00
Link (homepage): https://alpaca.markets/sdks/python/getting_started.html
Link (site_page): https://alpaca.markets/docs

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 97, longevity 100
- inputs: {"age_days": 1656, "days_push": 9, "days_rel": 22, "gap_med": 12.5, "n_releases_24m": 31}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1474, forks 394 (observed 2026-08-28T04:04:49.756070+00:00)

## What it is
The official Python SDK for Alpaca's commission-free trading APIs, providing REST and WebSocket/SSE interfaces for trading, account management, and streaming market data (stocks, crypto, options). It supersedes the deprecated alpaca-trade-api-python package and supports building algorithmic trading strategies and brokerage applications.

## Use cases
- build algorithmic trading bots in python
- stream real-time stock market data
- place and manage stock orders via api
- fetch historical crypto and stock price data
- manage a brokerage portfolio programmatically
- paper trade strategies before going live

## When to choose
- you want the official, actively maintained Alpaca SDK
- you need trading plus market data (stocks, crypto, options) in one library
- you're starting a new Alpaca integration in Python

## When to avoid
- you maintain legacy code on the deprecated alpaca-trade-api package and can't migrate yet
- you need a broker other than Alpaca
- you need a non-Python language SDK

## Facets
- artifact type: library
- maturity: active
- function: http-client, websocket, sdk, trading
- domain: fintech, apis, developer-tools
- platform: python, cli
- tags: alpaca, stock-market, algorithmic-trading, market-data, rest-api, brokerage-api, crypto-trading, cryptocurrency

## Member repositories
- alpacahq/alpaca-py (main) score 98
- alpacahq/alpaca-trade-api-python (mirror) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:49.756070+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:13:36.007701+00:00, confidence not recorded.
  - readme: https://github.com/alpacahq/alpaca-py (fetched 2026-08-28T04:04:49.756070+00:00, sha f3757d3eb362)
  - homepage: https://alpaca.markets/sdks/python/getting_started.html (fetched 2026-08-29T10:52:41.600251+00:00, sha 2218a654560c)
  - site_page: https://alpaca.markets/docs (fetched 2026-08-29T10:52:41.603919+00:00, sha 10e61ad86a74)
  - registry_pypi: https://pypi.org/pypi/alpaca-py/json (fetched 2026-08-29T10:52:41.605815+00:00, sha 8281f8092e3b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
