Skip to content
Skillv1.0.0

alpaca

Alpaca brokerage — US stocks & ETFs. Account, positions, orders, quotes, history, and order placement (paper + live). Use when the user wants to check or trade a US-stock account on Alpaca (e.g. "Alpa

by starchild-ai-agent(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from starchild-ai-agent/official-skills (alpaca/SKILL.md). Install upstream with npx skills add starchild-ai-agent/official-skills --skill alpaca. Copyright stays with the author.

What this is

☁️ Cloud broker — Alpaca exposes a public REST API, so this runs directly in the Starchild container, no local gateway needed. US equities and ETFs.

Paper and live are fully separated: different key pairs, different hosts (paper-api.alpaca.markets vs api.alpaca.markets). A paper key physically cannot touch the live account. Live order placement additionally requires the --confirm-live flag.

Get your API keys

  1. Sign up at alpaca.markets (US brokerage; paper trading is free and needs no funding).
  2. Paper keys: log in → switch to Paper Trading (toggle top-left) → Home → "API Keys" panel → Generate New Keys. Copy the Key ID and Secret Key (secret shown once).
  3. Live keys (optional, real money): switch to Live Trading → same API Keys panel → generate. These are a different pair from paper.
  4. Market data: the free IEX feed works out of the box. SIP (full-market) needs a paid data subscription.

Configure (.env)

Request via secure input — never paste keys in chat. Variables:

Variable Required Notes
ALPACA_API_KEY yes (paper) paper Key ID
ALPACA_SECRET_KEY yes (paper) paper Secret
ALPACA_LIVE_API_KEY only for live live Key ID
ALPACA_LIVE_SECRET_KEY only for live live Secret
ALPACA_FEED no iex (default) or sip

Usage

pip install alpaca-py (first run). All commands print JSON. Default profile is paper.

python skills/alpaca/scripts/alpaca_cli.py status
python skills/alpaca/scripts/alpaca_cli.py account
python skills/alpaca/scripts/alpaca_cli.py positions
python skills/alpaca/scripts/alpaca_cli.py orders [--executions]
python skills/alpaca/scripts/alpaca_cli.py quote --symbol AAPL
python skills/alpaca/scripts/alpaca_cli.py history --symbol AAPL --period 1d --limit 90
# place (paper): qty OR notional, market OR limit
python skills/alpaca/scripts/alpaca_cli.py place --symbol AAPL --side buy --qty 1 --type market
python skills/alpaca/scripts/alpaca_cli.py place --symbol AAPL --side buy --notional 500 --type limit --limit-price 180
python skills/alpaca/scripts/alpaca_cli.py cancel --order-id <id>
# live: must add --profile live AND --confirm-live
python skills/alpaca/scripts/alpaca_cli.py --profile live --confirm-live place --symbol AAPL --side buy --qty 1

Periods: 1m 5m 15m 30m 1h 1d 1w 1M. Alpaca supports fractional --notional (dollar amount) orders.

Gotchas

  • status is the health check — it reports SDK install state, key presence, and pings the account. Run it first.
  • Free IEX data can be sparse/delayed off-hours; use sip only if the account has the paid feed.
  • Live trading is real money. The --confirm-live gate is intentional; never auto-add it.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/starchild-ai-agent-official-skills-alpaca/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

starchild-ai-agent-official-skills-alpaca.ocm.jsonjson
{
  "ocm": "1",
  "id": "starchild-ai-agent-official-skills-alpaca",
  "kind": "skill",
  "name": "alpaca",
  "description": "Alpaca brokerage — US stocks & ETFs. Account, positions, orders, quotes, history, and order placement (paper + live). Use when the user wants to check or trade a US-stock account on Alpaca (e.g. \"Alpaca buying power\", \"buy 1 AAPL on Alpaca paper\", \"my Alpaca positions\"). Cloud API, runs directly in the container.",
  "publisher": "starchild-ai-agent",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "coding",
      "finance"
    ],
    "tags": [
      "skill-md",
      "alpaca",
      "broker",
      "us-stocks",
      "etf",
      "trading",
      "paper-trading",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Alpaca brokerage — US stocks & ETFs. Account, positions, orders, quotes, history, and order placement (paper + live). Use when the user wants to check or trade a US-stock account on Alpaca (e.g. \"Alpaca buying power\", \"buy 1 AAPL on Alpaca paper\", \"my Alpaca positions\"). Cloud API, runs directly in the container."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/starchild-ai-agent/official-skills",
      "path": "alpaca/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/starchild-ai-agent/official-skills/blob/HEAD/alpaca/SKILL.md",
      "key": "starchild-ai-agent/official-skills/alpaca/SKILL.md"
    }
  },
  "instructions": "## What this is\n\n☁️ **Cloud broker** — Alpaca exposes a public REST API, so this runs **directly in the Starchild container**, no local gateway needed. US equities and ETFs.\n\nPaper and live are fully separated: **different key pairs, different hosts** (`paper-api.alpaca.markets` vs `api.alpaca.markets`). A paper key physically cannot touch the live account. Live order placement additionally requires the `--confirm-live` flag.\n\n## Get your API keys\n\n1. Sign up at [alpaca.markets](https://alpaca.markets) (US brokerage; paper trading is free and needs no funding).\n2. **Paper keys:** log in → swit",
  "cost": {
    "context_tokens": 703
  }
}

Fetch it by URL: GET /api/v1/registry/starchild-ai-agent-official-skills-alpaca/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.