lib-alpaca-pylisted
Install: claude install-skill howard-lynn-ye/fin-skills
# alpaca-py
The easiest US broker to automate — REST, real paper trading, free data — and the one whose rules
change silently depending on **which asset class** you point them at.
| | |
|---|---|
| pip / import | `pip install alpaca-py` · `import alpaca` |
| Version | **0.44.0 (2026-08-11)** · `>=3.10,<4.0`, classifiers through 3.14 · pure-Python wheel |
| Licence | ✅ **Apache-2.0** |
| Status | ✅ Active. 1,481★ `alpacahq/alpaca-py`, pushed 2026-09-03. 🔴 Legacy `alpaca-trade-api` 3.2.0 (2024-01-12) is deprecated |
## The trap that costs you money
🚨 **`url_override` bypasses the `paper` flag.** It replaces the base URL outright while `sandbox=paper` is still set from the flag — so `url_override=<live host>, paper=True` sends **live orders from a client that believes it is in the sandbox.** Never combine the two.
🚨 **And the advice you remember is inverted.** Paper and live are separate key pairs *and* separate hosts (`paper-api.alpaca.markets` vs `api.alpaca.markets`); keys are not portable.
- ✅ Verified in `alpaca/trading/client.py`: `TradingClient.__init__` declares **`paper: bool = True`**, resolving `url_override if url_override else BaseURL.TRADING_PAPER if paper else BaseURL.TRADING_LIVE`. **Omitting `paper` in `alpaca-py` gives you PAPER.**
- ✅ Verified in `alpaca_trade_api/common.py`: the legacy library's `get_base_url()` returns `os.environ.get('APCA_API_BASE_URL', 'https://api.alpaca.markets')` — **live by default, with no `paper` argument anywhere.** `REST(