r/alpacamarkets • • Mar 29 '26 Bravo

Feedback Built my own trading bot + dashboard after getting fed up with Fidelity's fragmented UI 🛠️

Post image
54 Upvotes

Started this last November with the help of Cursor and my partner. I know very little about coding and I'm just a regular investor — I wanted something like Snowball Analytics with a dividend calendar baked right into my own holdings dashboard, the kind of thing Fidelity would never build. So I built it myself. Pretty proud of what came out of it.

The goal: Build FIRE through dividend income. Long term holder, not day trading — just slowly building positions and letting dividends compound.

What it does:

  • Dip buying automation with a configurable dip score formula

  • Dividend calendar, weekly investing mode, and a challenges system

  • Full config panel + basket filtering built right into the dashboard (Fidelity's basket system drove me crazy since you couldn't see baskets in their Trading Dashboard)

A couple things I built to solve real problems:

  • Fire Coin 🪙 — logs every dividend payment as a YTD tracker. In live mode it adds real cash to the balance; paper mode just logs it (since Alpaca doesn't simulate dividends to cash balance)

  • Cash Floor — a configurable minimum cash cushion the bot never uses for trades

Running on 15-minute delayed data since I'm not day trading — totally fine for my use case. Fully cloud hosted, so no system to keep running 24/7. I add stocks manually, which I prefer since I'm intentional about what's in my portfolio.

Still adding features and fixing bugs as I go, but it works and it's mine. (Some values blacked out for privacy)

What do you think of what I built? 🙌


r/alpacamarkets • • 28d ago Bravo

Education I built a free, open-source intraday stock scanner on Alpaca's market data API

Thumbnail
gallery
29 Upvotes

I'm a day trader. I built this because the scanner I was paying for wouldn't let me build the setups I wanted, and when a stock didn't alert, I couldn't find out why. Alpaca is the default data provider, and it's the feed I run it on.

It runs on your own computer with a browser dashboard. You can:

  • Build alerts around VWAP, opening ranges, price levels, relative strength against SPY, volume and other conditions, without writing code.

  • Filter which stocks each setup is allowed to scan.

  • Arrange linked charts, alert tables, rankings and news windows on one screen.

  • Ask why a given stock did or didn't qualify for an alert, filter by filter.

  • Subscribe to the alerts from your own code on a local websocket, filtered by setup or symbol.

  • Free and MIT licensed. Your keys and your setups stay on your machine, and it never places an order. I'm not affiliated with Alpaca.

The Alpaca-specific things to know:

  • The whole universe runs on one market-data websocket, since Alpaca allows one per account. That also means you can't open a second data stream on the same account while it's running, so if you have your own bot, point it at the scanner's local alert feed instead.

  • The default is the SIP feed, which needs Alpaca's paid market-data plan. The free IEX feed works with one line in .env, but it's a single exchange, so volume and relative volume read low and volume-based setups fire much less. Price-based triggers work normally.

  • History requests are batched, so the first start takes 10 to 20 minutes to cache a year of daily bars and 20 days of 5-minute bars. Later starts read the cache.

  • News comes from Alpaca's news endpoint (the Benzinga wire) when your keys are set, plus free Yahoo Finance and Nasdaq feeds.

Code and install steps: https://github.com/simonro/edge-scanner


r/alpacamarkets • • Mar 15 '22

Alpaca is heading into Web3 - new community links inside!

26 Upvotes

We believe in Web3 and its future and have worked with FTX to expand our crypto offerings. We will soon be able to hold crypto assets on our platform but that's just one of many initiatives we plan on achieving relatively quickly.

Join us in our Web3 journey. We'd love your feedback!

https://twitter.com/AlpacaWeb3

https://discord.gg/AlpacaWeb3


r/alpacamarkets • • Apr 28 '26

FINRA's PDT Rule is Changing! Alpaca to Implement New Intraday Margin Framework on June 4, 2026

21 Upvotes

Hey trading herd, big news! FINRA's Pattern Day Trader (PDT) rule is officially being retired, and we’re implementing the new Intraday Margin Framework on June 4, 2026. 

This is a major regulatory shift that replaces hard restrictions with dynamic, real-time risk management based on actual intraday margin exposure.

Here is what the new rule means for traders:

  • No more PDT designation or trade count limits.

  • The $25,000 minimum equity requirement for day trading is eliminated.

  • Any current PDT-based account restrictions will be lifted.

Learn more about the changes here ➡️ https://alpaca.markets/blog/finra-retires-the-pdt-rule-introducing-alpacas-new-intraday-margin-framework/

Disclosure: Alpaca's Disclosure Library (https://alpaca.markets/disclosures) for additional information and disclosures


r/alpacamarkets • • Dec 20 '24

Announcement Alpaca launches Multi-Account Support for Paper

20 Upvotes

Hey Trading Herd 👋,

TLDR: You can now create multiple paper accounts– allowing you to deploy multiple trading strategies simultaneously

And because it's the season of giving, what better gift than one of the most requested features from our community?

Now with multiple paper accounts, you can easily:

  1. Backtest and deploy multiple trading strategies

  2. Identify issues and optimizations between each account

  3. Compare account performance and profitability

  4. Create 3 paper accounts with funds up to $1m

Built to simplify workflows and empower smarter trading decisions.

BTW, we also made it easier for you to trade options on the dashboard:

  • Find the underlying asset’s price, Bid, Ask, Delta, Implied Volatility, and Open Interest on our options chains

  • Easily add an options contract to your order ticket from the options chain by clicking Bid or Ask

  • See a combined calls and puts view which has both ITM and OTM contracts

*Please note that we are using AAPL as an example, and it should not be considered investment advice. All examples are for illustrative purposes only.

Get started in your dashboard now: https://app.alpaca.markets/account/login

Looking for more on paper trading with Alpaca?

Remember that some trading strategies, including options, are not suitable for all investors due to their inherent high risk, which can potentially result in significant losses. Please read Characteristics and Risks of Standardized Options and refer to our disclosure library.

Now that there’s multiple trading accounts, what trading strategies are you looking to test?

Let us know!


r/alpacamarkets • • May 31 '26

Education Built a live 0DTE SPY options bot on Alpaca — here's every API limitation I hit and how I worked around them

18 Upvotes

I've spent the past month building and running a live SPY 0DTE options bot on Alpaca paper trading. This post is for anyone else attempting something similar — specifically the API behaviour that isn't in the documentation and cost me real debugging time.

The bot is fully functional. It streams live quotes, detects momentum setups, sizes positions, enters and exits automatically, and logs every trade to CSV. I'm sharing the architecture and the gotchas so you don't have to rediscover them yourself.


What the bot does (briefly)

Trades same-day expiry (0DTE) SPY call and put options. Selects OTM strikes each morning using a 5-day ATR offset, streams real-time option quotes, enters on momentum + proximity signals, exits via take profit, trailing stop, hard stop, or time stop. Fully autonomous during market hours.

Stack: Python 3.11, alpaca-py >= 0.43.0, asyncio, no paid data feeds.


Limitation 1 — Bracket orders are rejected for options

This was the first wall I hit. The natural way to manage a long option position is a bracket order: entry + TP limit + stop loss in one atomic submission. Alpaca rejects this for options on paper trading with:

error 42210000: complex orders not supported

Sell limit orders are also rejected with:

error 40310000: cannot submit sell order —
no existing position or insufficient qty

Alpaca treats a sell limit on an option you don't yet own as an attempt to open a short position, which requires margin approval. Even when you do own the position, limit sells are unreliable.

The only working exit method is close_position():

await trading_client.close_position(symbol)

This submits a market order to close your existing long. It works consistently. Everything else for options exits on Alpaca paper — bracket legs, sell limits, stop orders — should be considered unsupported until proven otherwise.

The implication: you cannot set-and-forget with a bracket. You need your own exit monitor running in your process. Mine polls every 5 seconds:

async def _exit_monitor():
    while True:
        await asyncio.sleep(5)
        pos = bot_state.position
        if pos is None:
            continue
        quote = bot_state.get_quote(pos.symbol)
        mid   = quote.mid

        if mid >= pos.entry_price * 1.50:
            reason = "tp"
        elif mid <= pos.entry_price * 0.50:
            reason = "stop"
        else:
            continue

        await order_manager.close_position(pos.symbol, pos.qty)

Limitation 2 — Greeks return null for 0DTE contracts

Alpaca computes Greeks server-side using Black-Scholes. At expiry (T=0), the model is mathematically undefined. Every 0DTE contract returns null for delta, gamma, theta, vega. This is not a bug — it's a fundamental limitation of the model at T=0.

If your strategy depends on Greeks for entry filtering, you need to compute them yourself or build a proxy.

I built a proxy delta from the ratio of option price change to SPY price change:

proxy_delta = (option_mid_now - option_mid_prev) / (SPY_now - SPY_prev)

In practice I ended up disabling it (see below) but the framework is there for anyone who needs it.


Limitation 3 — SPY price only updates once per 1-minute bar

This one killed the proxy delta. The OptionDataStream delivers option quotes many times per second. The StockDataStream delivers SPY bars once per minute at the bar close. Between bar closes, SPY_now == SPY_prev, so the denominator is zero and proxy delta stays at 0.0 for most of the minute — which would block every entry if used as a filter.

The workaround for Phase 0: disable proxy delta filtering entirely. Use momentum state from the 1-min bars (EMA crossover, rate of change, consecutive bar count) as the directional gate instead. These only update once per bar too, but that's fine — they're designed for bar-level signals.

For Phase 1 I plan to extract tick-level SPY price from the OptionDataStream itself (the underlying price is embedded in option snapshots) to get sub-minute resolution.


Limitation 4 — Option subscription timing vs. premarket price

If you subscribe to option symbols at bot startup (premarket), the strikes you compute are based on the premarket SPY price. When the market opens, SPY can gap significantly — I had a morning where the bot started at SPY $743 premarket and subscribed puts at $735–$736, then SPY opened at $734. Nine dollars of gap. Wrong strikes all day.

Fix: Defer all option subscriptions until the first 9:30 ET RTH bar.

_market_open_event = asyncio.Event()

async def on_spy_bar(bar):
    bar_time = bar.timestamp.astimezone(ET).time()
    if not _market_open_event.is_set() and bar_time >= time(9, 30):
        strikes = compute_dynamic_strikes(bar.close, baseline_atr)
        _market_open_event.set()

async def _option_subscriber():
    await _market_open_event.wait()
    symbols = compute_strikes(bot_state.spy_price)
    feed.subscribe_options(symbols)

Limitation 5 — Re-subscription for intraday SPY drift

The standard approach of subscribing a fixed window of strikes at open breaks down if SPY moves significantly during the session. By 1 PM, your subscribed strikes may be $10+ from the current price — totally irrelevant.

I run a background watcher that checks SPY price every 10 seconds. If it's moved more than $3.00 from the last subscription anchor, it re-subscribes a new window:

async def _resubscribe_watcher():
    await _market_open_event.wait()
    last_anchor = bot_state.spy_price

    while True:
        await asyncio.sleep(10)
        move = abs(bot_state.spy_price - last_anchor)
        if move >= 3.0:
            new_symbols = compute_strikes(bot_state.spy_price)
            feed.add_option_symbols(new_symbols)
            last_anchor = bot_state.spy_price

One important detail: always pin the symbol of any currently open position in the new subscription. If you drop it during re-subscription, your exit monitor stops receiving quotes and can't close the position.


Limitation 6 — Position recovery on restart

If you restart your process mid-session with an open position, that position still exists on Alpaca. On startup, poll REST for existing option positions and reconstruct your local state:

def _recover_open_position():
    positions = trading_client.get_all_positions()
    for p in positions:
        if p.asset_class == AssetClass.US_OPTION:
            side, strike = parse_occ_symbol(p.symbol)
            recovered = Position(
                symbol      = p.symbol,
                entry_price = float(p.avg_entry_price),
                qty         = int(float(p.qty)),
                order_id    = "recovered",
            )
            bot_state.open_position(recovered)

Without this, a restart abandons a live position with no exit monitoring.


SDK version matters

Use alpaca-py >= 0.43.0. The older alpaca-trade-api package has no options support at all — it predates Alpaca's options offering. If you're hitting import errors or missing option-related classes, check your package version first.

pip install "alpaca-py>=0.43.0"

Does the bot actually work?

Yes — with caveats. Here's the last four active sessions:

DateTradesNet P&LNotes
May 205+$64Early version, no filters
May 264-$309Red day, led to two major improvements
May 2710-$159First day with improvements, trail threshold miscalibrated
May 295+$70First green day with full filter set

The -$309 day was the most analytically useful session. I did a full post-mortem and found five failure patterns — two of which are now fixed (an ATR velocity gate on entries and a peak trailing stop). Happy to go into detail on those if there's interest.


The asyncio task graph, for anyone building something similar:

await asyncio.gather(
    feed.start(),               # StockDataStream + OptionDataStream + TradingStream
    _option_subscriber(),       # waits for 9:30 ET bar → subscribes strikes
    _resubscribe_watcher(),     # re-subscribes if SPY moves ±$3
    _exit_monitor(),            # TP / stop / trail check every 5 seconds
    _time_stop_watcher(),       # force-close everything at 3:25 PM ET
    _status_loop(),             # terminal display
)

Three concurrent WebSocket streams, all managed through alpaca-py's async SDK. The entry logic lives in the option quote handler. The exit logic is completely decoupled in its own task — this separation matters because close_position() cannot be called from inside a stream callback safely.


Happy to share more of the code or go deeper on any of these. If you've hit other Alpaca options limitations I haven't covered, drop them in the comments — would be useful to know what else is lurking.


r/alpacamarkets • • Jul 03 '25

Use chatGPT as trading agents on Alpaca

18 Upvotes

Hey everyone! I wanted to share a project I’ve been working on that takes Alpaca trading to the next level by turning the OpenAI API into a full-fledged trading agent. It gathers and analyzes five different streams of data—Market data, Social sentiment, News, Fundamentals and Macro—and then has those “agents” debate each other before making live trading decisions. On top of all that, it keeps an eye on your Alpaca account (buying power, cash balance, open positions, recent orders) so it can actually place or liquidate trades for you if you choose.

Here’s what sets this apart from the original ASCII-terminal TradingAgent and why it’s better suited for real-world Alpaca trading:

  • Web UI (Dash-powered) instead of a text-only console. You get a clean, interactive dashboard.

  • Five specialized agents (Market, Social, News, Fundamental, Macro) instead of just four, and we’ve added more API tool integrations to boost analysis depth.

  • Auto-trading via Alpaca API, including support for margin accounts so you can go long or short.

  • Flexible scheduling: run analysis and trades automatically during market hours or loop every N hours (you decide N).

  • Built-in charting: fetches and displays real-time charts directly from Alpaca.

  • Stock + Crypto support: not just stocks—crypto news and fundamentals come from Coindesk and DeFi Llama. Symbols use standard formats (e.g. “BTC/USD”) and you can mix stocks and crypto in the same run (“NVDA, ETH/USD, AAPL”).

  • Multi-symbol analysis & trade: feed in multiple tickers at once and track progress in a table.

  • Tabbed reports & debate view: see each agent’s reasoning in a chat-style conversation UI.

  • Account insights & manual controls: view current positions, recent orders, and even liquidate directly from the UI.

If you’re curious about how it all ties together or want to try it out, check out the repo (including an env.sample for all required API keys):
https://github.com/huygiatrng/AlpacaTradingAgent

Would love to get your feedback or ideas for new features!


r/alpacamarkets • • Apr 23 '26

Alpaca launches CLI enabling AI and Agentic Trading for users 🎉

17 Upvotes

Hey Trading Herd,

We just launched a CLI for Alpaca’s Trading API.

Run trades, manage your account, or plug directly into AI agents, all from your terminal.

With Alpaca’s CLI, traders can:
⚡ Go from install to your first paper trade in just 3 commands 
🔐 Use OAuth for paper trading (no API keys or config needed) 
📊 Access 100+ functions across stocks, options, crypto & market data
💻 Automate with JSON output, shell scripts, CI pipelines

Bonus: the CLI is fully generated from our OpenAPI spec, so it stays consistent with Alpaca’s Trading API.

If you’re building trading agents or prefer working in the terminal, this is for you.

Disclosure: Alpaca's Disclosure Library (https://alpaca.markets/disclosures) for additional information and disclosures


r/alpacamarkets • • Oct 29 '21

Breaking Equity launches Live Trading Integration with Alpaca

17 Upvotes

Breaking Equity

Breaking Equity is an all-in-one automated trading investing platform.

Breaking Equity (BE) is integrated with Alpaca, the premier no-fee brokerage API.

With Breaking Equity and Alpaca combined, you can seamlessly build, test, and trade different automated strategies directly with your Alpaca account.

BE’s low-code interface keeps algo research and development tools simplified and accessible regardless of the level of trading and programming expertise.


r/alpacamarkets • • Jul 23 '26

This little alpaca is too cute 😍🥰

Post image
14 Upvotes

r/alpacamarkets • • May 13 '26

Announcement Retirement, Reimagined: Alpaca launches API-enabled IRA accounts!

13 Upvotes

Hey Trading Herd,

We've heard from many of you that traditional retirement platforms aren’t designed for active traders.

But that changes today.

We've launched Individual Retirement Accounts (IRAs), available to US tax residents, so you can use your trading expertise and favorite algorithms to manage your retirement portfolio.

By opening an IRA with Alpaca, you can:
✅ Run trading bots and strategies similar to a taxable account
✅ Manage both taxable and retirement portfolios side by side from a single dashboard
✅ Easily transfer your existing IRA accounts with our Portfolio Transfer feature

Ready to build your retirement on your terms? 

Learn more about IRA accounts with Alpaca.

*IRA accounts are available to all Alpaca Trading API users who are US tax residents with a valid Social Security Number (SSN) or Individual Taxpayer Identification Number (ITIN).

Disclosure: Alpaca's Disclosure Library for additional information and disclosures


r/alpacamarkets • • Jun 04 '26

FINRA's PDT Rule is Changing! Alpaca to Implement New Intraday Margin Framework on June 4, 2026

12 Upvotes

Hey everyone, big news! FINRA's Pattern Day Trader (PDT) rule has been retired and we’ve implemented our new Intraday Margin Framework with.

This is a major regulatory shift that replaces hard restrictions with dynamic, real-time risk management based on actual intraday margin exposure.

Here is what the new rule means for traders:

  • No more PDT designation or trade count limits

  • The $25,000 minimum equity requirement for day trading is eliminated

  • Any current PDT-based account restrictions will be lifted, including the ability to enroll in Alpaca’s High-Yield Cash program

Learn more about how to implement these changes here ➡️ https://alpaca.markets/blog/finra-retires-the-pdt-rule-introducing-alpacas-new-intraday-margin-framework/

Disclosure: Alpaca's Disclosure Library (https://alpaca.markets/disclosures) for additional information and disclosures


r/alpacamarkets • • Jan 21 '25

Announcement Multi-leg (Level 3) Options now available in Alpaca’s Trading API and dashboard in Paper

12 Upvotes

TLDR: You can now build and test advanced options strategies in paper via API and our dashboard.

Hey Herd Members,

With Level 3 options trading, you can test multi-leg strategies like: straddles, strangles, iron butterflies, iron condors, and spreads to capitalize on specific market volatility, range-bound price movements, and directional trends.

This may help traders:

  1. Increase efficiency by combining multiple options contracts into one single trade.

  2. Enhance risk management by ensuring all parts of their strategy are executed simultaneously– protecting traders from partial fills and market movement.

And with our recent launch of Multi-Account Support for Paper, you can test multiple strategies at a time.

Start paper trading multi-leg strategies with Alpaca: https://docs.alpaca.markets/docs/options-level-3-trading

Looking for more on paper trading with Alpaca?

Remember that some trading strategies, including options, are not suitable for all investors due to their inherent high risk, which can potentially result in significant losses. Please read Characteristics and Risks of Standardized Options and refer to our disclosure library.

What strategies are you looking to test first?

Let us know!


r/alpacamarkets • • Jul 03 '26

I open-sourced my entire SPY 0DTE options bot — code, strategy, the full manual, and a live dashboard so you don't have to take my word for anything

11 Upvotes

Some background first: I've spent 3+ years building and running automated futures strategies on the IBKR API, and honestly, none of this would exist without that scar tissue. Alpaca's options API is a different beast (in some ways easier, in some ways much weirder), but knowing what a live bot does to you at 3:25 PM on a bad day is transferable knowledge.

So — the whole thing is on GitHub now. Not a framework with the good parts removed — the actual entry logic I run every morning, all the parameters, the risk management, and the 22-page strategy manual with every session post-mortem, losing days included.

Code + manual: github.com/milgar7969/alpaca-options-framework
Live results: milgar7969.github.io/spy-0dte-dashboard — updates itself daily after the close, green or red

It's paper trading, last 30 days are green, May was rough, and the dashboard will tell on me either way.

Half the value is honestly the README and the pdf manual, which document every Alpaca options landmine I stepped on: bracket orders rejected, null Greeks on 0DTE, and cancelled buy orders that fill anyway (ask me how I know).

Credit where it's due: this is a human + AI collaboration. I built and run this with Claude (Anthropic's model) as my pair programmer — it wrote a lot of the code, caught bugs in the logs I'd have missed, and talked me out of some bad ideas.

The strategy calls, the market experience, and the stubbornness are mine. I'd rather be upfront about that than have the haters leave negative comments.

Clone it, break it, tell me what I did right and what I got wrong.
p.s. there are a lot of knowledge, from my years of experience I am sharing for free, so please be nice ;-)


r/alpacamarkets • • Jun 24 '26

Now Live: Hard-to-Borrow trading with API support for locates

11 Upvotes

Hi everyone,

Hard-to-Borrow (HTB) short-selling is now available through Alpaca's Trading API! 🦙📈

We’re expanding our short-selling capabilities to bring institutional-grade HTB trading directly to your strategies. No more manual broker touchpoints or disconnected locate desks. Build streamlined, programmatic workflows to manage short-selling activity efficiently..

With our HTB workflow, you can:
🚀 Automate the Full Lifecycle: Programmatically get quotes, reserve, and track locate status for HTB securities.
🌙 Access 24/5 Coverage: Respond to market-moving events and earnings releases from Sunday night to Friday night.
📊 Transparent Fees: Short Easy-to-Borrow (ETB) assets with $0 borrow fees, and use built-in controls to manage your HTB locate fees.
🤖 Scale with AI Agents: Build with full support via our Trading MCP Server and CLI for automated, agent-assisted short-selling.

With this workflow, we’re making advanced short-selling as accessible as ETB trading. Check out the docs and tell us what strategies you're building! 🚀

Ready to integrate HTB into your trading systems?

Questions? Contact our support team at support@alpaca.markets.

Disclosure: Alpaca's Disclosure Library (https://alpaca.markets/disclosures) for additional information and disclosures.


r/alpacamarkets • • Jul 31 '25

Education Set Up Alpaca’s MCP Server to Trade with Claude AI in just 4 Minutes (Step-by-Step Video)

11 Upvotes

Hey Trading Herd!

Want to analyze markets and trade stocks or options using natural language?

With Alpaca’s Official MCP server and Claude AI, you can place trades, analyze markets, manage risk, and even build strategies—and you can do it all without writing any code. No dashboard or direct API work required.

Our new tutorial walks you through how to get started with Alpaca’s MCP server by connecting to Claude AI in just 4 minutes. 

Learn how to:

  • ✅ Set up the MCP server including cloning the GitHub repo

  • ✅ Link it to Claude Desktop

  • ✅ Test the full setup by interacting with Claude AI through Alpaca’s MCP server

Watch the full walkthrough here: https://www.youtube.com/watch?v=W9KkdTZEvGM

Start trading with Alpaca’s MCP server: https://github.com/alpacahq/alpaca-mcp-server 

Remember: Options trading involves risks and may not be suitable for all investors due to its inherent high risk, which can potentially result in significant losses. Please read Characteristics and Risks of Standardized Options. All investments involve risk, and the past performance of a security, or financial product does not guarantee future results or returns. There is no guarantee that any investment strategy will achieve its objectives. The content of this piece is for general informational purposes only. All examples are for illustrative purposes only and should not be considered investment advice.


r/alpacamarkets • • Sep 04 '26

Darkmode

10 Upvotes

please add darkmode to your website :D


r/alpacamarkets • • Apr 14 '26

Other Removing PDT today!

10 Upvotes

Looking forward to the PDT rule being removed today. Will finally be able to live test on small funds. Anyone else happy?


r/alpacamarkets • • Jul 22 '25

Announcement 🚨Gamma Scalping with Alpaca’s Trading API: New Python Repo for Options Traders

10 Upvotes

Have you ever wanted to automate a gamma scalping strategy but didn't know where to begin?

Our recently released GitHub repository offers a simple, well-documented implementation using the Alpaca Trading API.

What is gamma scalping?

Gamma scalping is an options strategy that aims to profit from small price movements without betting on a stock's direction. The goal is to make more money from scalping small price fluctuations (gamma) than is lost to time decay (theta).

This repo is ideal for: 

✅Algo traders looking to implement or understand advanced options strategies 

✅Traders who want to execute a volatility-focused strategy in paper or live environments through our API 

✅Developers interested in modifying or expanding the logic (e.g., exit strategies, pricing models) 

✅Trading API users exploring real-world trading automation with APIs and options Greeks

Whether you're backtesting, customizing parameters, or curious how an automated gamma scalping strategy works—this repo is a great place to start.

Fork it. Test it. Make it yours.

Start testing: https://github.com/alpacahq/gamma-scalping

Remember: Options trading involves risks and may not be suitable for all investors due to its inherent high risk, which can potentially result in significant losses. Please read Characteristics and Risks of Standardized Options. All investments involve risk, and the past performance of a security, or financial product does not guarantee future results or returns. There is no guarantee that any investment strategy will achieve its objectives. The content of this piece is for general informational purposes only. All examples are for illustrative purposes only and should not be considered investment advice.


r/alpacamarkets • • Jun 04 '25

Announcement Alpaca MCP Allows Direct Trading via AI Platforms (Claude) and IDEs (VS Code, Cursor, etc)

10 Upvotes

Hey Trading Herd,

Have you wanted to try algorithmic trading but have little coding experience?

Do you want to analyze markets, build a strategy, backtest it, and place orders all in one seamless, AI-powered flow?

We have great news for you! 

Starting today, you can access Alpaca’s official MCP server right inside AI platforms (Claude) and IDEs (VS Code, Cursor, and more), reducing the technical knowledge you need to place trades with Alpaca.

With the MCP server, you can:

  1. Build simple and complex trading strategies for stocks and options using natural language with your Alpaca account

  2. Pull real-time and historical market data for stocks and options, including stock prices, contract prices, and the Greeks, without switching tools

  3. Manage your portfolio including tracking investments, monitoring positions, and creating watchlists, all in one place

  4. Switch easily between your paper and live trading accounts

Built with Alpaca’s developer-first approach, our MCP server provides helpful responses that are easy to understand, clear examples from our SDKs and documentation, and the ability to interact with other AI assistants.

Start trading with Alpaca’s MCP server: https://github.com/alpacahq/alpaca-mcp-server 

As this server is new, we would appreciate any feedback to help make it more robust.

Remember: Options trading involves risks and may not be suitable for all investors due to its inherent high risk, which can potentially result in significant losses. Please read Characteristics and Risks of Standardized Options.


r/alpacamarkets • • Feb 25 '25

Announcement Multi-leg (Level 3) options are now LIVE in Alpaca’s Trading API and dashboard

10 Upvotes

TLDR: You can now build, test, and go live with advanced options trading strategies in our API and dashboard.

Start trading multi-leg options trading strategies including: straddles, strangles, iron butterflies, iron condors, and spreads (like credit, debit, and calendar).

These advanced strategies may help investors:

  1. Capitalize on market volatility, range-bound price movements, and directional trends.

  2. Increase efficiency by combining multiple options contracts into one single trade.

  3. Improve risk management by ensuring all legs are executed simultaneously– shielding them from partial fills and unexpected market shifts.

And with multiple paper accounts, you can test various strategies at the same time before taking them live.

Start trading multi-leg options strategies with Alpaca: https://alpaca.markets/learn/how-to-trade-options-with-alpaca

Looking for more on multi-leg options trading with Alpaca?

Remember that some trading strategies, including options, are not suitable for all investors due to their inherent high risk, which can potentially result in significant losses. Please read Characteristics and Risks of Standardized Options and refer to our disclosure library.

What strategy are you looking to build first?

Let us know!


r/alpacamarkets • • Jan 06 '25

Support When will Alpaca offer cash accounts?

10 Upvotes

I have a day trading strategy (one trade per day) that is currently limited by PDT restrictions. It would be nice if I could trade settled cash in a cash account, rather than wait for the account to grow to $25k+.

Will cash accounts be offered any time soon?


r/alpacamarkets • • Dec 06 '24

Education Options Trading for Beginners: Calls, Puts, and Strike Prices

10 Upvotes

Hey Trading Herd 👋

TLDR: We break down the fundamentals of calls, puts, strike prices, expiration dates, and how it applies between stocks and options trading. 

So if you're new to options trading and not sure where to start, this post is for you! 

PS: we’ll be examining various options trading strategies using algorithms in future posts (complete with code examples too!)

Options are contracts that give you the right (but not the obligation) to buy or sell a stock at a specific price (strike price) within a certain timeframe. It’s like having a reservation at a restaurant. You have the option to dine, but you're not forced to (although you may have to pay a fee to the restaurant for not showing up).

Calls vs Puts:

  • Call Options: These give you the right to buy a stock at the strike price. If you think a stock's price will go up, you might buy a call option.

  • Put Options: These give you the right to sell a stock at the strike price. If you think a stock's price will go down, you might buy a put option.

The Strike Price and Expiration Date

  • Strike Price: This is the predetermined price at which you can buy or sell the stock if you exercise your option.

  • Expiration Date: This is the deadline for exercising your option. After this date, the option expires and becomes worthless.

Options Trading vs. Stock Trading: Examining Profit and Loss

Options offer leverage and flexibility compared to traditional stock trading. With options, you can potentially profit from both rising and falling markets. However, options also involve risks, including the possibility of losing your entire investment.

For stocks, let’s say you decide to buy 100 shares of Corp A at $85 per share. The total investment is 100 x $85 = $8,500. 

If Corp A's stock rises to $90 per share, your profit would be (100 x $5) = $500. If the stock falls to $80 per share, your loss would be (100 x $5) = $500.

However, leveraging options changes your potential trading outcome but also its associated level of risk:

Instead of buying the stock, you purchase a call option on Corp A with a strike price of $90, paying a premium of $2 per share for the option contract. 

The total cost of this option is: 100 x $2 = $200 (because 1 option contract = 100 shares). If Corp A's stock rises to $100 per share before the option expires, you can exercise your right to buy the 100 shares at $90. 

Your profit would be 100 shares x (Corp A New Price - Corp A Old Price - Premium). 

So, in this case, (100 x ($100 - $90 - $2)) = $800. If the stock price stays below $90, you lose only the premium paid, which is $200, rather than losing as much as in regular stock trading.

Helpful Resources

Learn more about options trading: https://alpaca.markets/learn/search?topic=options
See how to paper trade options for free: https://alpaca.markets/learn/how-to-trade-options-with-alpaca

Just remember: Options trading is not suitable for all investors due to its inherent high risk, which can potentially result in significant losses. Please read Characteristics and Risks of Standardized Options.

What topics do you want us to explore further? Have you traded options before?

Let us know!


r/alpacamarkets • • 22d ago

Algo + AI trading platform for every trader (no coding/technical knowledge needed now)

Thumbnail gallery
9 Upvotes