alpaca-broker-trading-orders

Place, modify, and track orders for end-user accounts via the Alpaca Broker API.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building trading, recurring-invest, or portfolio flows on Alpaca requires navigating the Broker API's order lifecycle, fractional-share rules, and account-scoped endpoints, where mistakes like mixing qty and notional or mishandling order states cause rejected orders and broken user experiences. ## Core Features & Use Cases - Order Management: Create, list, replace, and cancel orders for any end-user account using account-scoped endpoints, with support for market, limit, stop, stop-limit, and trailing-stop types plus bracket, OCO, OTO, and multi-leg order classes. - Fractional & Notional Trading: Place dollar-based or fractional-share orders with correct time-in-force constraints, precision rules, and fractionability checks. - Positions & Buying Power: Read positions and trading-account details to validate buying power before submitting notional orders. - Use Case: Build a recurring-invest feature that fetches pending invest instructions, checks each account's buying power, places notional market day orders with idempotent client order IDs, and tracks fills through the trade-events stream. ## Quick Start Place a $25 fractional market buy order for AAPL on a given Alpaca Broker account and check its status.

Frequently Asked Questions about alpaca-broker-trading-orders

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

FAQPage Schema
How do I place a fractional share order with the Alpaca Broker API?▼

Submit a POST to /v1/trading/accounts/{account_id}/orders with a decimal qty or notional string, type market, and time_in_force day. The asset must have fractionable set to true, and fractional sells cannot be shorted.

How do I build a recurring investment feature on Alpaca?▼

Fetch pending invest instructions from your database, check each account's buying power, place a notional market day order per instruction with a unique client_order_id, and mark instructions done only after a successful create. Schedule the batch shortly before market open.

What is the difference between qty and notional in Alpaca orders?▼

qty specifies a share quantity while notional specifies a dollar amount, and they are mutually exclusive — supplying both returns a 400 error. Both accept up to 9 decimal places, and notional orders are limited to market and limit types with day time-in-force.

Why was my Alpaca order rejected with a wash-trade error?▼

Alpaca rejects orders that could self-cross with an existing opposite-side order at crossable prices, returning a 403. Use bracket, OCO, or trailing-stop orders for simultaneous take-profit and stop-loss, since those are exempt from the wash-trade check.

Can I modify a notional or fractional order after submitting it?▼

Notional orders cannot be replaced — you must cancel and resubmit them. Fractional qty values also cannot be changed on replace, and replacement is blocked while an order is in accepted, pending_new, pending_cancel, or pending_replace states.

What do the Alpaca order statuses accepted, new, and pending_new mean?▼

accepted means Alpaca received the order but has not routed it, new means it is routed to exchanges, and pending_new means routed but not yet accepted for execution. Treat all three as in-flight and track terminal states like filled, canceled, or rejected via the trade-events stream.