據 AlphaMoat 統計,截至 2026-09,Alpaca Trading 累計下載 3,073 次、獲 3 個星標,在全部 5,078 個 AI 技能中排名第 3,682 位,在「專業領域」分類(465 個)中排名第 308 位。
| 平台 | 累計安裝 | 累計下載 | 星標 | 評論 |
|---|---|---|---|---|
| ClawHub ↗ | 102 | 3073 | 3 | - |
各平台的計數口徑不同,統計時間不一致。
技能可提交或取消訂單,也能讀取市場資料並建立行情流。實盤憑據可能影響真實帳戶;--force 可跳過確認提示。交易前應獨立核實標的、方向、數量和帳戶模式,並明確授權每筆訂單;不要把工具輸出當作投資建議。
資料釋出於 2026-10-29
以下是根據技能文件生成的示例,不代表實際執行結果。
--force。2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。
| 月份 | 累計下載 | 環比 | 星標 |
|---|---|---|---|
| 2026-09 | 3073 | — | 3 |
| 2026-08 | 2980 | +3.5% | 3 |
| 2026-07 | 2878 | — | 3 |
以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。
--- name: alpaca description: Trade stocks and crypto via Alpaca API. Use for market data (quotes, bars, news), placing orders (market, limit, stop), checking positions, portfolio management, and account info. Supports both paper and live trading. Use when user asks about stock prices, wants to buy/sell securities, check portfolio, or manage trades. --- # Alpaca Trading Skill Trade stocks and crypto programmatically via Alpaca's API. ## Setup
Requires API credentials stored in environment or config:
```bash
# Set environment variables
export ALPACA_API_KEY="your-api-key"
export ALPACA_SECRET_KEY="your-secret-key"
export ALPACA_PAPER="true" # "true" for paper, "false" for live
```
Or store in `~/.openclaw/credentials/alpaca.json`:
```json
{
"apiKey": "your-api-key",
"secretKey": "your-secret-key",
"paper": true
}
```
## Quick Reference
### Get Quote
```bash
python3 scripts/alpaca_cli.py quote AAPL
python3 scripts/alpaca_cli.py quote AAPL,TSLA,NVDA
```
### Get Bars (Historical Data)
```bash
python3 scripts/alpaca_cli.py bars AAPL --timeframe 1Day --limit 10
python3 scripts/alpaca_cli.py bars AAPL --timeframe 1Hour --start 2026-02-01
```
### Check Account
```bash
python3 scripts/alpaca_cli.py account
```
### List Positions
```bash
python3 scripts/alpaca_cli.py positions
```
### Place Orders
```bash
# Market order
python3 scripts/alpaca_cli.py order buy AAPL 10
# Limit order
python3 scripts/alpaca_cli.py order buy AAPL 10 --limit 150.00
# Stop order
python3 scripts/alpaca_cli.py order sell TSLA 5 --stop 200.00
# Stop-limit order
python3 scripts/alpaca_cli.py order sell TSLA 5 --stop 200.00 --limit 195.00
# Skip price validation (use with caution)
python3 scripts/alpaca_cli.py order buy AAPL 10 --limit 999.00 --force
```
**Order Guardrails:**
1. **Symbol validation** — Rejects invalid/unknown tickers
2. **Buying power check** — Blocks orders exceeding available funds, shows max shares
3. **Duplicate detection** — Warns if you have open orders for same symbol/side
4. **Price validation** — Warns if limit price is worse than market
5. **Market hours check** — Detects pre-market, after-hours, and closed sessions
- Pre-market (4:00 AM - 9:30 AM ET): Option to place pre-market order
- After-hours (4:00 PM - 8:00 PM ET): Option to place after-hours order
- Closed: Warns order will queue until market open
6. **Cost confirmation** — Shows total cost and requires confirmation
Use `--force` to skip all confirmation prompts (use with caution).
### List Orders
```bash
python3 scripts/alpaca_cli.py orders
python3 scripts/alpaca_cli.py orders --status open
python3 scripts/alpaca_cli.py orders --status closed --limit 20
```
### Cancel Order
```bash
python3 scripts/alpaca_cli.py cancel ORDER_ID
python3 scripts/alpaca_cli.py cancel all # Cancel all open orders
```
### Get News
```bash
python3 scripts/alpaca_cli.py news AAPL
python3 scripts/alpaca_cli.py news AAPL,TSLA --limit 5
```
### Watchlist
```bash
python3 scripts/alpaca_cli.py watchlist list
python3 scripts/alpaca_cli.py watchlist create "Tech Stocks" AAPL,MSFT,GOOGL
python3 scripts/alpaca_cli.py watchlist add WATCHLIST_ID NVDA
python3 scripts/alpaca_cli.py watchlist delete WATCHLIST_ID
```
### Stream Live Data (Websocket)
```bash
# Stream trades (default)
python3 scripts/alpaca_cli.py stream AAPL
# Stream quotes
python3 scripts/alpaca_cli.py stream AAPL,TSLA --type quotes
# Stream bars (1-min)
python3 scripts/alpaca_cli.py stream NVDA --type bars
# Stream all data types
python3 scripts/alpaca_cli.py stream AAPL --type all
```
Press Ctrl+C to stop streaming.
### Price Alerts
```bash
# Add alert - notify when INTU drops below $399
python3 scripts/alpaca_cli.py alert add --symbol INTU --price 399 --condition below
# Add alert - notify when AAPL goes above $300
python3 scripts/alpaca_cli.py alert add --symbol AAPL --price 300 --condition above
# List active alerts
python3 scripts/alpaca_cli.py alert list
# Check alerts (used by cron)
python3 scripts/alpaca_cli.py alert check
# Remove an alert
python3 scripts/alpaca_cli.py alert remove --alert_id ABC123
# Clear all alerts
python3 scripts/alpaca_cli.py alert clear
```
Alerts are stored in `~/.openclaw/data/alpaca-alerts.json`.
## Script Location
All commands use: `scripts/alpaca_cli.py` (relative to this skill directory)
## API Reference
See `references/api.md` for detailed API documentation and response formats.
## Safety Notes
- Always confirm with user before placing real trades
- Paper trading (`ALPACA_PAPER=true`) recommended for testing
- Check buying power before large orders
- Verify order details before submission
基於 AkShare 庫取 A 股行情、財務與板塊資料的資料介面技能。
用自然語言查詢東方財富的金融資料,結果落成 Excel 與 Markdown 表格。
協助整理中國專利相關材料、檢索問題和技術說明草稿。
金融資料查詢技能:基於 westock 命令列工具查詢市場結構化資料。
以 Yahoo Finance 資料取報價與基本面,並生成帶技術指標圖表的本地行情分析技能。
按價值投資框架做 A 股與港股估值分析的技能。
查詢 A 股行情、分析分時成交量並管理持倉的指令碼。
盯住自選股的行情與技術指標,觸發條件時按級別推送預警訊息。
資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。