Works with the AI Agents you already use

    Alpaca Trading Bot - Paper-First Intraday Stock Bot

    by Mayank Sharma

    1

    Install a working algorithmic trading bot in a few minutes, straight from your agent.

    $1

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Alpaca Trading Bot - Paper-First Intraday Stock Bot

    Alpaca Trading Bot - Paper-First Intraday Stock Bot

    Example session with this skill installed

    Install the Alpaca trading bot in a new folder, set it up for paper trading, and start it.

    • Read your context and instructions
    • Compiled the alpaca trading bot

    Summary

    The bot is installed in alpaca-trading-bot/, your Alpaca

    paper keys are verified, and it's running in paper mode. Your keys stayed in .env; I never saw them in chat.

    What I did

    StepResult
    Wrote the bot files (bot.py, core/, analytics/, deploy/)Done
    Created .venv and installed alpaca-py, pandas, numpy, pyarrow, python-dotenvDone
    You pasted your paper keys into .envDone
    python bot.py --checkOK
    python bot.py (paper mode)Running

    Credential check

    [CHECK] Mode: PAPER
    [ACCOUNT] equity=$100,258.01 | cash=$100,258.01 | buying_power=$401,032.04
    [CHECK] Market open: False
    [CHECK] OK - credentials work. Start the bot with: python bot.py
    

    Startup log

    [UNIVERSE] Building universe (no fresh cache)...
    [DEBUG] Final symbols (12): ['AAPL', 'MSFT', 'TSLA', 'NVDA', 'AMZN', 'META', 'GOOGL', 'AMD', 'SPY', 'QQQ', 'GLD', 'PLUG']
    [PRELOAD] Loading bars for 12 symbols...
    [PRELOAD] Done in 2.8s
    [BOT] Entering main loop (tick every 60s)
    [BOT] Market closed - waiting... (07:26:45 ET)
    

    The market is closed right now, so it's waiting. When it opens at 9:30 ET it starts scoring signals every minute; look for [SIGNAL], [EXEC] and [STATUS] lines.

    Next steps

    • Keep it running: leave this terminal open, or ask me to set it up as an always-on service on a Linux server.
    • Stopping it closes all positions, so stop it outside market hours unless you mean to flatten.
    • Live trading stays off unless you explicitly ask for it and confirm.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Install a working algorithmic trading bot in a few minutes, straight from your agent. The agent writes the bot into a folder on your machine, installs its Python packages, has you put your Alpaca paper keys into a local .env file (keys never go through the chat), checks the connection, and starts it.

    What it does

    • Trades up to 25 liquid US stocks and ETFs (AAPL, MSFT, NVDA, SPY, QQQ and more), long and short
    • Scores EMA 9/21 trend and crossovers, the 15-minute trend, RSI and volume surges on finished 5-minute bars
    • Every entry is a bracket order: stop-loss at 1.5x ATR, take-profit at 2x the risk
    • Risk limits: 1% risk per trade, max 8 positions, 50% gross exposure, 3 new entries per minute
    • Daily loss limit: down 3% vs the previous close, it closes everything and stops for the day
    • Flattens all positions 5 minutes before the close
    • Optional always-on setup on any small Linux server (systemd guide included)

    Safety first

    • Paper trading is the default. The agent is instructed never to switch to live trading unless you ask for it explicitly and confirm.
    • Your API keys stay in a local .env file. The agent never asks for them in chat or prints them.
    • Network access is Alpaca only (plus PyPI during install).

    Limitations

    • US stocks and ETFs during regular market hours only; no options or crypto
    • Uses Alpaca's free IEX data feed, which covers only part of US trading volume
    • Shorting needs a margin-enabled account
    • No backtest or performance record is included, and paper results don't predict live results

    Disclaimer

    This is software, not investment advice. It makes no promise of profit, and trading can lose money. You are responsible for your account and the trades it places.

    US stocks/ETFs only. No crypto or options. Uses Alpaca IEX data feed. Requires Python 3.10+. No built-in backtesting suite. Shorting requires margin account.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 13 days ago

    Accounts
    Alpaca account (free paper trading)
    Software
    Python 3.10+

    Use your Alpaca PAPER keys. You type them into the local .env file yourself; the agent never asks for them in chat.

    Permissions

    Terminal / Shell
    Write Files
    Network Access
    Read Files
    Environment Variables

    Allowed Hosts

    alpaca.markets

    File Scopes

    alpaca-trading-bot/**

    Terminal: create a Python virtual environment, install packages from PyPI and run the bot. Read/Write files: only inside the bot's own folder (source files, .env, cache/ of price bars). Network: Alpaca API (paper-api.alpaca.markets, api.alpaca.markets for live, data.alpaca.markets) and PyPI during install. Environment variables: ALPACA_API_KEY, ALPACA_API_SECRET, ALPACA_PAPER (plus optional ALPACA_BASE_URL, ALPACA_SYMBOLS), read from the local .env file and sent only to Alpaca.

    Listed13 days ago

    What's inside

    Frequently Asked Questions

    The full Python source of the bot (bot.py plus its core/ and analytics/ modules), a requirements.txt, an env.example template for your Alpaca keys, a systemd service file and a step-by-step guide for running it always-on on a Linux server. Your agent writes these into a folder on your machine.

    The bot is built for Python 3.10+ and requires a free or paid Alpaca account; it is compatible with any AI agent or IDE capable of running Python scripts and managing environment variables.

    Yes, the bot is set to paper trading by default, allowing you to test the EMA and RSI signals with virtual currency before committing any real capital.

    It trades US stocks and ETFs only, during regular market hours (no options, crypto or extended hours). Signals use Alpaca's free IEX data feed, which covers only part of US volume, and shorting needs a margin-enabled account. Its risk limits (1% risk per trade, max 8 positions, 3% daily loss limit) reduce risk but cannot prevent losses.

    Five minutes before the close it closes every open position (selling longs and buying back shorts), so nothing is held overnight. The stop-loss and take-profit orders attached to each trade are cancelled with it.

    Yes, but only if you ask for it explicitly. Paper trading is the default, and the agent is instructed to warn you and get a clear yes before switching to live. Live trading uses real money and can lose it; this skill is software, not investment advice.

    New in Trading & Investing

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Trading & Investing.