{
  "schemaVersion": "1.0",
  "item": {
    "slug": "alpaca",
    "name": "Alpaca Trading",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/vamzi/alpaca",
    "canonicalUrl": "https://clawhub.ai/vamzi/alpaca",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/alpaca",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=alpaca",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "references/api.md",
      "scripts/alpaca_cli.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-23T16:43:11.935Z",
      "expiresAt": "2026-04-30T16:43:11.935Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=4claw-imageboard",
        "contentDisposition": "attachment; filename=\"4claw-imageboard-1.0.1.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/alpaca"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/alpaca",
    "agentPageUrl": "https://openagent3.xyz/skills/alpaca/agent",
    "manifestUrl": "https://openagent3.xyz/skills/alpaca/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/alpaca/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Alpaca Trading Skill",
        "body": "Trade stocks and crypto programmatically via Alpaca's API."
      },
      {
        "title": "Setup",
        "body": "Requires API credentials stored in environment or config:\n\n# Set environment variables\nexport ALPACA_API_KEY=\"your-api-key\"\nexport ALPACA_SECRET_KEY=\"your-secret-key\"\nexport ALPACA_PAPER=\"true\"  # \"true\" for paper, \"false\" for live\n\nOr store in ~/.openclaw/credentials/alpaca.json:\n\n{\n  \"apiKey\": \"your-api-key\",\n  \"secretKey\": \"your-secret-key\",\n  \"paper\": true\n}"
      },
      {
        "title": "Get Quote",
        "body": "python3 scripts/alpaca_cli.py quote AAPL\npython3 scripts/alpaca_cli.py quote AAPL,TSLA,NVDA"
      },
      {
        "title": "Get Bars (Historical Data)",
        "body": "python3 scripts/alpaca_cli.py bars AAPL --timeframe 1Day --limit 10\npython3 scripts/alpaca_cli.py bars AAPL --timeframe 1Hour --start 2026-02-01"
      },
      {
        "title": "Check Account",
        "body": "python3 scripts/alpaca_cli.py account"
      },
      {
        "title": "List Positions",
        "body": "python3 scripts/alpaca_cli.py positions"
      },
      {
        "title": "Place Orders",
        "body": "# Market order\npython3 scripts/alpaca_cli.py order buy AAPL 10\n\n# Limit order\npython3 scripts/alpaca_cli.py order buy AAPL 10 --limit 150.00\n\n# Stop order\npython3 scripts/alpaca_cli.py order sell TSLA 5 --stop 200.00\n\n# Stop-limit order\npython3 scripts/alpaca_cli.py order sell TSLA 5 --stop 200.00 --limit 195.00\n\n# Skip price validation (use with caution)\npython3 scripts/alpaca_cli.py order buy AAPL 10 --limit 999.00 --force\n\nOrder Guardrails:\n\nSymbol validation — Rejects invalid/unknown tickers\nBuying power check — Blocks orders exceeding available funds, shows max shares\nDuplicate detection — Warns if you have open orders for same symbol/side\nPrice validation — Warns if limit price is worse than market\nMarket hours check — Detects pre-market, after-hours, and closed sessions\n\nPre-market (4:00 AM - 9:30 AM ET): Option to place pre-market order\nAfter-hours (4:00 PM - 8:00 PM ET): Option to place after-hours order\nClosed: Warns order will queue until market open\n\n\nCost confirmation — Shows total cost and requires confirmation\n\nUse --force to skip all confirmation prompts (use with caution)."
      },
      {
        "title": "List Orders",
        "body": "python3 scripts/alpaca_cli.py orders\npython3 scripts/alpaca_cli.py orders --status open\npython3 scripts/alpaca_cli.py orders --status closed --limit 20"
      },
      {
        "title": "Cancel Order",
        "body": "python3 scripts/alpaca_cli.py cancel ORDER_ID\npython3 scripts/alpaca_cli.py cancel all  # Cancel all open orders"
      },
      {
        "title": "Get News",
        "body": "python3 scripts/alpaca_cli.py news AAPL\npython3 scripts/alpaca_cli.py news AAPL,TSLA --limit 5"
      },
      {
        "title": "Watchlist",
        "body": "python3 scripts/alpaca_cli.py watchlist list\npython3 scripts/alpaca_cli.py watchlist create \"Tech Stocks\" AAPL,MSFT,GOOGL\npython3 scripts/alpaca_cli.py watchlist add WATCHLIST_ID NVDA\npython3 scripts/alpaca_cli.py watchlist delete WATCHLIST_ID"
      },
      {
        "title": "Stream Live Data (Websocket)",
        "body": "# Stream trades (default)\npython3 scripts/alpaca_cli.py stream AAPL\n\n# Stream quotes\npython3 scripts/alpaca_cli.py stream AAPL,TSLA --type quotes\n\n# Stream bars (1-min)\npython3 scripts/alpaca_cli.py stream NVDA --type bars\n\n# Stream all data types\npython3 scripts/alpaca_cli.py stream AAPL --type all\n\nPress Ctrl+C to stop streaming."
      },
      {
        "title": "Price Alerts",
        "body": "# Add alert - notify when INTU drops below $399\npython3 scripts/alpaca_cli.py alert add --symbol INTU --price 399 --condition below\n\n# Add alert - notify when AAPL goes above $300\npython3 scripts/alpaca_cli.py alert add --symbol AAPL --price 300 --condition above\n\n# List active alerts\npython3 scripts/alpaca_cli.py alert list\n\n# Check alerts (used by cron)\npython3 scripts/alpaca_cli.py alert check\n\n# Remove an alert\npython3 scripts/alpaca_cli.py alert remove --alert_id ABC123\n\n# Clear all alerts\npython3 scripts/alpaca_cli.py alert clear\n\nAlerts are stored in ~/.openclaw/data/alpaca-alerts.json."
      },
      {
        "title": "Script Location",
        "body": "All commands use: scripts/alpaca_cli.py (relative to this skill directory)"
      },
      {
        "title": "API Reference",
        "body": "See references/api.md for detailed API documentation and response formats."
      },
      {
        "title": "Safety Notes",
        "body": "Always confirm with user before placing real trades\nPaper trading (ALPACA_PAPER=true) recommended for testing\nCheck buying power before large orders\nVerify order details before submission"
      }
    ],
    "body": "Alpaca Trading Skill\n\nTrade stocks and crypto programmatically via Alpaca's API.\n\nSetup\n\nRequires API credentials stored in environment or config:\n\n# Set environment variables\nexport ALPACA_API_KEY=\"your-api-key\"\nexport ALPACA_SECRET_KEY=\"your-secret-key\"\nexport ALPACA_PAPER=\"true\"  # \"true\" for paper, \"false\" for live\n\n\nOr store in ~/.openclaw/credentials/alpaca.json:\n\n{\n  \"apiKey\": \"your-api-key\",\n  \"secretKey\": \"your-secret-key\",\n  \"paper\": true\n}\n\nQuick Reference\nGet Quote\npython3 scripts/alpaca_cli.py quote AAPL\npython3 scripts/alpaca_cli.py quote AAPL,TSLA,NVDA\n\nGet Bars (Historical Data)\npython3 scripts/alpaca_cli.py bars AAPL --timeframe 1Day --limit 10\npython3 scripts/alpaca_cli.py bars AAPL --timeframe 1Hour --start 2026-02-01\n\nCheck Account\npython3 scripts/alpaca_cli.py account\n\nList Positions\npython3 scripts/alpaca_cli.py positions\n\nPlace Orders\n# Market order\npython3 scripts/alpaca_cli.py order buy AAPL 10\n\n# Limit order\npython3 scripts/alpaca_cli.py order buy AAPL 10 --limit 150.00\n\n# Stop order\npython3 scripts/alpaca_cli.py order sell TSLA 5 --stop 200.00\n\n# Stop-limit order\npython3 scripts/alpaca_cli.py order sell TSLA 5 --stop 200.00 --limit 195.00\n\n# Skip price validation (use with caution)\npython3 scripts/alpaca_cli.py order buy AAPL 10 --limit 999.00 --force\n\n\nOrder Guardrails:\n\nSymbol validation — Rejects invalid/unknown tickers\nBuying power check — Blocks orders exceeding available funds, shows max shares\nDuplicate detection — Warns if you have open orders for same symbol/side\nPrice validation — Warns if limit price is worse than market\nMarket hours check — Detects pre-market, after-hours, and closed sessions\nPre-market (4:00 AM - 9:30 AM ET): Option to place pre-market order\nAfter-hours (4:00 PM - 8:00 PM ET): Option to place after-hours order\nClosed: Warns order will queue until market open\nCost confirmation — Shows total cost and requires confirmation\n\nUse --force to skip all confirmation prompts (use with caution).\n\nList Orders\npython3 scripts/alpaca_cli.py orders\npython3 scripts/alpaca_cli.py orders --status open\npython3 scripts/alpaca_cli.py orders --status closed --limit 20\n\nCancel Order\npython3 scripts/alpaca_cli.py cancel ORDER_ID\npython3 scripts/alpaca_cli.py cancel all  # Cancel all open orders\n\nGet News\npython3 scripts/alpaca_cli.py news AAPL\npython3 scripts/alpaca_cli.py news AAPL,TSLA --limit 5\n\nWatchlist\npython3 scripts/alpaca_cli.py watchlist list\npython3 scripts/alpaca_cli.py watchlist create \"Tech Stocks\" AAPL,MSFT,GOOGL\npython3 scripts/alpaca_cli.py watchlist add WATCHLIST_ID NVDA\npython3 scripts/alpaca_cli.py watchlist delete WATCHLIST_ID\n\nStream Live Data (Websocket)\n# Stream trades (default)\npython3 scripts/alpaca_cli.py stream AAPL\n\n# Stream quotes\npython3 scripts/alpaca_cli.py stream AAPL,TSLA --type quotes\n\n# Stream bars (1-min)\npython3 scripts/alpaca_cli.py stream NVDA --type bars\n\n# Stream all data types\npython3 scripts/alpaca_cli.py stream AAPL --type all\n\n\nPress Ctrl+C to stop streaming.\n\nPrice Alerts\n# Add alert - notify when INTU drops below $399\npython3 scripts/alpaca_cli.py alert add --symbol INTU --price 399 --condition below\n\n# Add alert - notify when AAPL goes above $300\npython3 scripts/alpaca_cli.py alert add --symbol AAPL --price 300 --condition above\n\n# List active alerts\npython3 scripts/alpaca_cli.py alert list\n\n# Check alerts (used by cron)\npython3 scripts/alpaca_cli.py alert check\n\n# Remove an alert\npython3 scripts/alpaca_cli.py alert remove --alert_id ABC123\n\n# Clear all alerts\npython3 scripts/alpaca_cli.py alert clear\n\n\nAlerts are stored in ~/.openclaw/data/alpaca-alerts.json.\n\nScript Location\n\nAll commands use: scripts/alpaca_cli.py (relative to this skill directory)\n\nAPI Reference\n\nSee references/api.md for detailed API documentation and response formats.\n\nSafety Notes\nAlways confirm with user before placing real trades\nPaper trading (ALPACA_PAPER=true) recommended for testing\nCheck buying power before large orders\nVerify order details before submission"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/vamzi/alpaca",
    "publisherUrl": "https://clawhub.ai/vamzi/alpaca",
    "owner": "vamzi",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/alpaca",
    "downloadUrl": "https://openagent3.xyz/downloads/alpaca",
    "agentUrl": "https://openagent3.xyz/skills/alpaca/agent",
    "manifestUrl": "https://openagent3.xyz/skills/alpaca/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/alpaca/agent.md"
  }
}