alpaca-trading-paper-trading-cli

Preview, submit, and manage Alpaca paper-trading orders for equities, options, and crypto via the Alpaca CLI.

4|Updated Aug 28, 2026
One-click install
npx skills add https://github.com/alan-d-smith/synthetix-alpha --skill alpaca-trading-paper-trading-cli-alan-d-smith
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: alpaca-trading-paper-trading-cli
Source: https://github.com/alan-d-smith/synthetix-alpha/tree/main/.agents/skills/alpaca-trading-paper-trading-cli
Command: npx skills add https://github.com/alan-d-smith/synthetix-alpha --skill alpaca-trading-paper-trading-cli-alan-d-smith

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Executing strategy signals as paper trades requires careful order construction, endpoint verification, and lifecycle tracking; this Skill gives an AI agent a guarded, step-by-step workflow to place and manage Alpaca paper-trading orders through the Alpaca CLI without ever risking a live account. ## Core Features & Use Cases - Guarded order submission: Verifies the CLI resolves to the paper endpoint with alpaca doctor, previews every order with --dry-run, and requires explicit confirmation before submitting. - Multi-asset order support: Handles US equities, options (including multi-leg mleg orders), and crypto with per-asset-class validation of order types, time-in-force, and extended-hours rules. - Full lifecycle management: Monitors fills, rejections, and cancellations, manages cancel/replace operations, and writes a complete audit trail (orders.json, order_log.csv, portfolio summaries) to a run folder. - Use Case: A backtest produces a buy signal on AAPL; the agent confirms the strategy with you, validates buying power and asset tradability, previews a limit order, submits it to the paper account, and reports the fill with portfolio impact. ## Quick Start Ask the agent to buy 10 shares of AAPL as a limit order at $185.50 in your Alpaca paper account using the Alpaca CLI.

Frequently Asked Questions about alpaca-trading-paper-trading-cli

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

FAQPage Schema
How do I submit a paper trade with the Alpaca CLI?▼

Use `alpaca order submit` with flags for symbol, side, qty, type, and time-in-force, after verifying the paper endpoint with `alpaca doctor`. Preview the exact request body first with `--dry-run` and pass a unique `--client-order-id` for idempotency.

How do I make sure the Alpaca CLI is using the paper endpoint?▼

Run `alpaca doctor` and require its Trading line to read https://paper-api.alpaca.markets. Never pass `-p`/`--profile` because doctor ignores it; set ALPACA_PROFILE for the session and ensure ALPACA_LIVE_TRADE is unset.

What order types does Alpaca support for options and crypto?▼

Options support market, limit, stop, and stop_limit with day or gtc time-in-force, plus multi-leg orders via the mleg class. Crypto supports market, limit, and stop_limit with gtc or ioc, and defaults to gtc when no time-in-force is given.

What should I do if an Alpaca order submission fails ambiguously?▼

Do not resubmit after a timeout or killed process. Look the order up with `alpaca order get-by-client-id` using the client order ID generated before submission; only a confirmed miss justifies a retry, since a hit means resubmitting would duplicate the order.

Can I automate Alpaca paper trading with cron or CI?▼

Yes, but route every scheduled submission through a wrapper script that runs `alpaca doctor` and greps for the paper endpoint before ordering. Set PATH, ALPACA_PROFILE, and credentials explicitly in the crontab or CI environment, and never call `alpaca order submit` directly from a scheduler.