alpaca-trading

Executes stock, crypto, and options trades through the Alpaca Trading API.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? It removes the friction of manually interacting with the Alpaca brokerage platform by providing ready-to-use Python patterns and scripts for placing orders, monitoring positions, and managing a trading account programmatically. ## Core Features & Use Cases - Order Management: Submit market, limit, stop, and stop-limit orders for stocks, crypto, and options with configurable time-in-force settings. - Account & Position Monitoring: Check buying power, portfolio value, open positions, and profit/loss from the command line. - Paper Trading Support: Test strategies risk-free against Alpaca's paper trading environment before going live. - Use Case: A developer building an automated trading bot can use the included scripts to verify account status, inspect open positions, and place test orders against the paper API before deploying a live strategy. ## Quick Start Ask the assistant to check your Alpaca paper trading account balance and open positions using the provided scripts with your API keys set as environment variables.

Frequently Asked Questions about alpaca-trading

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

FAQPage Schema
How do I place an order with the Alpaca API in Python?▼

Use the alpaca-py SDK's TradingClient with a MarketOrderRequest or LimitOrderRequest specifying symbol, quantity, side, and time in force. The included place_order.py script lets you submit orders directly from the command line with arguments like --symbol, --qty, and --type.

What is the difference between Alpaca paper trading and live trading?▼

Paper trading uses paper-api.alpaca.markets with simulated orders and no real money, while live trading uses api.alpaca.markets with real funds. Both provide real market data, so paper trading is ideal for testing strategies before risking capital.

Does Alpaca support crypto and options trading?▼

Yes, Alpaca supports fractional crypto trading with pairs like BTC/USD using GTC time in force, and options trading with levels from covered calls to spreads. Options orders use the contract ID obtained from get_option_contracts.

Why am I getting a 403 or 429 error from the Alpaca API?▼

A 403 error usually means invalid API keys, missing permissions, insufficient buying power, or trading halts. A 429 error indicates you exceeded the 200 requests per minute rate limit, so implement exponential backoff and use WebSocket streaming instead of polling.

How do I check my Alpaca positions and account balance?▼

Call get_account() for buying power, cash, and portfolio value, and get_all_positions() for open positions with entry prices and unrealized P/L. The check_account.py and check_positions.py scripts display this information formatted in the terminal.