Skip to content
Back to skills

Alpaca Trading

ASecurity

Load when the user provides stock trading recommendations and wants positions sized and bracket orders placed on the Alpaca paper-trading account.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 6, 2026
ai-agentsgoapi

Works with

  • api

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned October 6, 2026

npx -y skills add datar-gaurav/sutra-os --skill alpaca-trading --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Alpaca Trading?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Alpaca Trading
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/datar-gaurav-alpaca-trading/badge)](https://www.skillsdirectory.com/skills/datar-gaurav-alpaca-trading)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: Alpaca Trading
slug: alpaca-trading
description: |
  Load when the user provides stock trading recommendations and wants positions
  sized and bracket orders placed on the Alpaca paper-trading account.
icon: TrendingUp
color: "#22c55e"
version: 2.1.0
category: trading
tools:
  - alpaca_get_portfolio
  - alpaca_get_quote
  - alpaca_place_bracket_order
  - alpaca_place_order
  - alpaca_list_orders
  - alpaca_cancel_order
config_schema:
  type: object
  properties:
    risk_pct:
      type: number
      default: 0.05
    concentration_cap_pct:
      type: number
      default: 0.20
    cash_reserve_pct:
      type: number
      default: 0.15
    price_deviation_cap:
      type: number
      default: 0.01
---

**Paper trading only.** Never claim real execution. You are not a financial advisor — you mechanically apply the rules below.

Risk config: risk_pct={risk_pct}, concentration_cap_pct={concentration_cap_pct}, cash_reserve_pct={cash_reserve_pct}, price_deviation_cap={price_deviation_cap}.

Input format (one rec per line):
```
Symbol | Buy | Target | Stop | Reason
AMD    | 253.85 | 279.24 | 241.16 | Long; semi momentum
```

Workflow:
1. `alpaca_get_portfolio()` once. Compute `deployable_cash`, `max_per_position`, `risk_budget`. If `deployable_cash ≤ 0`, place nothing and explain.
2. For each rec: `alpaca_get_quote(symbol)`. Skip if price has moved beyond `price_deviation_cap` or if R:R denominator ≤ 0. Sort survivors by R:R descending.
3. Size positions per `references/sizing.md`. Deduct deployed capital from running `deployable_cash` as you go.
4. `alpaca_place_bracket_order(...)` for each sized trade. On failure: `references/error-handling.md`.
5. Reconcile existing positions — if bracket legs differ from the new rec, cancel + replace with sell-side bracket. If they match, mark `HOLD`.
6. Emit the final summary using `assets/summary_template.md`.

**Safety rules (non-negotiable):**
- Never exceed `concentration_cap_pct` of equity in one symbol (including existing holdings).
- Never deploy cash below the `cash_reserve_pct` reserve.
- Never submit a bracket entry without both stop-loss and take-profit.
- Never chase price beyond `price_deviation_cap`.

## Gotchas

Files in this skill

  • SKILL.md2.2 KB
  • assets/summary_template.md1 KB
  • references/error-handling.md939 B
  • references/sizing.md1.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…