autotrader

Automates paper trading on Alpaca using strategy signals and AI-driven market analysis.

11|6|Updated Mar 18, 2026
One-click install
npx skills add https://github.com/sixteen-dev/obai --skill autotrader-sixteen-dev
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: autotrader
Source: https://github.com/sixteen-dev/obai/tree/main/skills/autotrader
Command: npx skills add https://github.com/sixteen-dev/obai --skill autotrader-sixteen-dev

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires alpaca-py, structlog, and includes scripts (resource) components.

What problem does it solve? Managing a paper trading portfolio requires constant monitoring of technical indicators, news, and risk limits. This Skill automates the daily trading routine on Alpaca's paper trading platform, combining mechanical strategy signals with AI-powered qualitative analysis so every trade decision is disciplined, logged, and risk-checked. ## Core Features & Use Cases - Automated Daily Trading Routine: Checks market hours, reconciles positions with Alpaca, evaluates strategy signals, and executes or closes trades with built-in risk validation. - AI Analysis Overlay: Uses the OBaI multi-agent CLI to fetch technical indicators, news, fundamentals, portfolio risk metrics, and backtesting results to inform entry and exit decisions. - Enforced Risk Limits: Hard-coded checks for max position size (10% of equity), daily trade count (20), daily loss (3%), and total exposure (90%), with non-negotiable stop-loss handling. - Use Case: Deploy a mean-reversion strategy JSON, then run the daily routine each morning — the Skill reads your strategies, asks OBaI for current RSI and MACD values, screens for signals, checks news catalysts, and places risk-validated orders on your Alpaca paper account while journaling every decision. ## Quick Start Run the daily trading routine to check my portfolio, evaluate strategy signals, and execute any valid trades on my Alpaca paper account.

Frequently Asked Questions about autotrader

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate paper trading with the Alpaca API?▼

Use the alpaca-py TradingClient in paper mode to submit market, limit, stop, and stop-limit orders programmatically. This Skill wraps those calls in scripts that validate every order against risk limits before submission and return JSON results.

How to backtest a trading strategy before deploying it?▼

Ask the OBaI CLI to backtest your strategy — it supports daily and intraday timeframes, 89 indicators, walk-forward validation, and shared-capital portfolio mode. Extract the Final Strategy JSON from the response and save it to memory/strategies/ for deployment.

Does this trading bot use real money?▼

No. The Alpaca client is hard-coded with paper=True, so all orders execute on Alpaca's paper trading platform with simulated funds. Real-money trading is not supported by these scripts.

What risk limits does the trading bot enforce?▼

Orders are rejected if they exceed 10% of equity per position, 20 trades per day, 3% daily loss, or 90% total exposure. All limits are configurable via environment variables like MAX_POSITION_PCT and MAX_DAILY_LOSS_PCT.

Why was my trade order rejected by the risk checker?▼

Rejections occur when the order breaches position size, exposure, daily trade, or daily loss limits, or when buying power is insufficient. Market orders on new positions also require --limit-price so the checker can estimate position size.

Can the bot trade when the market is closed?▼

By default, execute_trade rejects orders when the market is closed and reports the next open time. You can override this with --allow-after-hours, but queued market orders will fill at unpredictable prices on the next open.