storyclaw-alpaca-trading

US stock and crypto trading via Alpaca API. Paper trading (simulated) and real trading supported. Real-time quotes, orders, positions, RSI strategy.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "storyclaw-alpaca-trading" with this command: npx skills add patches429/storyclaw-alpaca-trading

Alpaca Trading - US Stock & Crypto Trading

Trade US stocks and crypto via Alpaca API. Supports both paper trading (simulated, free) and real trading.

Critical Rules

  1. NEVER execute a trade without showing a plan and getting explicit confirmation
  2. NEVER set up cron jobs without proposing them first
  3. NEVER make up prices or data — always query real data
  4. NEVER assume what the user wants to trade — ask first

Multi-User Support

Each user has their own credentials/{USER_ID}.json:

{
  "apiKey": "YOUR_KEY",
  "apiSecret": "YOUR_SECRET",
  "baseUrl": "https://paper-api.alpaca.markets",
  "dataUrl": "https://data.alpaca.markets"
}

To switch to real trading, change baseUrl to https://api.alpaca.markets.

Or set ALPACA_API_KEY and ALPACA_API_SECRET env vars.

First-Time User Flow

  1. Check credentials: USER_ID=$TELEGRAM_USER_ID node {baseDir}/scripts/trading.js check
  2. Ask what they want to trade (stocks vs crypto, symbols, amount, risk)
  3. Propose a concrete plan — WAIT FOR CONFIRMATION
  4. Execute only after user confirms

Commands

Account & Positions

node {baseDir}/scripts/trading.js check              # Check config
node {baseDir}/scripts/trading.js account            # Balance
node {baseDir}/scripts/trading.js positions          # Current holdings
node {baseDir}/scripts/trading.js history            # Order history
node {baseDir}/scripts/trading.js portfolio-history  # Equity curve (1W default)
node {baseDir}/scripts/trading.js portfolio-history 1M  # 1D/1W/1M/3M/1A

Market Data

node {baseDir}/scripts/trading.js quote AAPL         # Real-time quote
node {baseDir}/scripts/trading.js bars AAPL 30       # Price history
node {baseDir}/scripts/trading.js rsi AAPL 14        # RSI indicator

Trading

node {baseDir}/scripts/trading.js buy AAPL 10        # Buy (market order)
node {baseDir}/scripts/trading.js sell AAPL 10       # Sell

Strategy

node {baseDir}/scripts/trading.js strategy-rsi AAPL  # RSI mean reversion
# RSI < 30 + no position → BUY; RSI > 70 + has position → SELL

Features

  • US Stocks & Crypto (AAPL, TSLA, BTC, ETH, and more)
  • Paper OR real trading (depends on credentials)
  • Real-time quotes (15-min delayed on free tier)
  • Market orders, technical indicators (RSI)
  • Market hours: Stocks 9:30-16:00 ET Mon-Fri; Crypto 24/7

Setup

  1. Sign up at https://app.alpaca.markets/brokerage/new-account
  2. Generate API key + secret (Paper Trading section)
  3. Create credentials/{USER_ID}.json or set env vars

API Limits

TierCalls/minData delay
Free20015 min
UnlimitedUnlimitedReal-time

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Web3

Onchain Analyzer

Analyze wallet addresses and on-chain activity — transaction history, token holdings, DeFi positions, and trading patterns across EVM chains and Solana. Use...

Registry SourceRecently Updated
Web3

Idiom Dictionary

成语词典。成语查询、典故故事、成语接龙、成语猜谜、造句示例、分类浏览。Chinese idiom dictionary with stories, chain game, quiz. 成语、典故、国学。

Registry SourceRecently Updated
1521Profile unavailable
Web3

Wallet Tracker

Multi-chain wallet asset tracker — monitor EVM and Solana wallets, aggregate portfolio, and detect holding changes. Use when you need wallet tracker capabili...

Registry SourceRecently Updated
2050Profile unavailable
Web3

inventpay

Accept crypto payments, manage a digital storefront, and track balances through the InventPay REST API

Registry SourceRecently Updated
550Profile unavailable