r/alpacamarkets • • 13d ago

Alpaca API Security Posture

1 Upvotes

To those using Alpaca with real money - how hard did you get dropped on your head as child?

In all seriousness, the API security is...a single god key with no IP restrictions. WTF are the security team at alpaca doing with their time? Do they have a CISO? A full access root key shouldn't even exist.

We need:

- Role Based API Keys (read only, instrument restriction, account restrictions, time-of-day restrictions, order size restrictions, so much more)

- TTLs for Keys

- API generation / rotation endpoint for keys

- CIDR / IP allow lists

- GEO restrictions


r/alpacamarkets • • 21d ago

Education Full ML Algo Creator software. Python & PineScript AI Algo Generation.

Thumbnail gallery
0 Upvotes

r/alpacamarkets • • Jul 28 '25

I really hope I'm misunderstanding something because I'm livid. The spent the last 2 days building an algo only to find out Alpacas "real time data" is 15 min behind

0 Upvotes

I created an algo in python using Alpacas API for real time data now I'm only getting alerts 15 min after they occur. Did I mess up or is Alpaca a bunch of liars?


r/alpacamarkets • • May 27 '26

Feedback 6 months building a Python trading bot for Alpaca. Paper account sitting at $120k from 100K. Here's what I used.

1 Upvotes

r/alpacamarkets • • Aug 10 '26

Education Precious alpaca

Post image
0 Upvotes

r/alpacamarkets • • Aug 28 '26

Support My paper position was silently DELETED, no order, no fill, no corporate action, no cash credit. If the engine can remove positions without a settlement event, why should anyone trust the live platform?

2 Upvotes

This week a long ETF position in my Alpaca "paper account" disappeared overnight. Not closed or removed.
Account equity dropped by exactly the position's market value and the cash balance never changed.

What the API evidence shows:

  • No sell order exists on the account the last order ever created predates the loss

  • No fill exists the activity feed simply has no exit

  • No corporate action none on the symbol, no split (position count didn't change, price didn't halve)

  • No transfer/journal nothing moved

  • The position's shares were held for orders by a protective stop that had been stuck in pending_cancel for 15+ minutes (a market close during that state gets rejected:"insufficient qty available held_for_orders")

  • The deletion happened inside Alpaca's nightly paper-processing window (03:28–03:33 ET)

So: the paper engine encountered a position whose shares were reserved by an order it was canceling, and instead of resolving it, it deleted the position at zero proceeds.

My questions for the Alpaca team:

  1. Can you confirm this behavior, that the paper engine can remove positions with no settlement event while processing pending_cancel orders? Is this "expected" paper-environment behavior?

  2. On a live account, shares are held in custody at DTC through the broker deleting customer shares without a settlement event would be a books-and-records violation with a legal restoration duty.

  3. Is the paper engine's ledger held to the same correctness bar as the live stack? Because right now the answer looks like no.

  4. If this class of state bug existed on live, what is Alpaca's committed, written remediation process for affected customers?

Paper trading exists precisely so we can trust the stack before risking money.
A simulator that can silently vaporize positions teaches the opposite lesson. I'd like an official answer and a fix.


r/alpacamarkets • • 7d ago

Easiest way to automate TradingView on Alpaca?

1 Upvotes

Had a Pine Script strategy sending TradingView alerts through a flask app on a VPS to my Alpaca account (about 35k). VPS rebooted overnight, missed two exits

Deciding between fixing my setup, paying for a router like TradersPost, or just going with a full system like Kronos Trading so I stop tinkering

What's the least headache? Genuine recs only pls, no DMs


r/alpacamarkets • • Jul 16 '26

Introducing NexusTrade: The World's First Agentic Trading Marketplace

Thumbnail
nexustrade.io
1 Upvotes

You've all seen the grift: someone wraps GPT around the Alpaca API, calls it an "AI quant fund," and charges $99/month for a bot that YOLOs market orders. I've been openly annoyed about this for years, so here's what I built instead.

NexusTrade is an agentic trading platform plus a marketplace. The short version:

  • An AI agent (Aurora) that ideates strategies, builds custom indicators from raw sources (SEC filings, congressional disclosures, your own CSVs), authors the rules, backtests across a decade, and runs walk-forward validation on out-of-sample folds

  • No LLM in the execution loop. Aurora writes the rules, a deterministic Rust engine executes them. Every condition evaluation is logged, so "why didn't my bot buy on Tuesday" is a click, not a debugging session

  • Automated multi-leg options with delta-based strike selection and rolling

  • A marketplace where you can sell your strategy as a subscription ($0 to $999.99/month, paid via Stripe Connect). Buyers see returns, drawdown, Sortino, and whether it's real money or paper before paying. Your rules stay hidden until they subscribe

For the devs here: the whole platform is exposed over an API and MCP. 125 tools, OAuth 2.1 with dynamic client registration. You can build, backtest, sweep parameters, deploy, and list a bot entirely from your own scripts or from Claude.

I'm also running a live public portfolio (real money, every fill visible) so nobody has to take my word on anything.

Browsing the marketplace is free, no account needed: nexustrade.io/marketplace. You can also read the full launch article here.

Happy to answer anything about the architecture, the backtest engine, or why I think most "AI trading" products are toys. And yes, roast away, that's what this sub is for.

Standard disclaimer: not financial advice, backtests lie if you let them, trade paper first.


r/alpacamarkets • • Aug 16 '25

What was I thinking?!!

2 Upvotes

Ok, I know there's a MUCH easier route to this outcome, but I just couldn't help myself. Spent countless hours of vibe coding, but I'm already seeing double digit returns after just 1 week. Here's the Exec Summary - feel free to chop it apart! ;-)
*************
A fully automated, broker-integrated trading stack that can operate with as little as $1,000 and scale up cleanly—while enforcing strict, programmatic risk controls. It’s live, observable, and controllable from the command line. And as a bonus, receive Slack alerts throughout the day.

Strategy (simple + disciplined)

  • Signal model: momentum / breakout buys only (from BreakoutScout).

  • Exit model: position-level trailing stops via PositionGuardian

    • Arms at +10% above average cost, trails at 5% below peak.

  • Daily portfolio guard: if equity ≤ −5% vs. yesterday, pause new buys (sells still allowed) until the guard clears.

  • Universe: curated ~50 liquid names | Primarily AI ecosystem symbols

  • Fractional, dollar-based sizing: so I can trade high-priced names with small accounts.

System architecture (modular + observable)

  • Agents (systemd services):

    • scout_clean – data refresh & cleanup

    • breakout_scout – emits v=1 buy signals

    • position_guardian – emits v=1 sell/exit signals (trail/stop)

    • exec_probe – consumes signals, applies gates, enqueues orders

  • Event bus: append-only signals.jsonl → orders.todo.jsonl queue.

  • Broker: Alpaca REST

  • State & cache: state/account.cache.json (equity, buying power, status) and state/buy_gate.json (open/paused, reason).

  • Schedulers: account_cache.timer refreshes account state every ~30s.

Execution & sizing (ready for $1k → $100k)

  • Env settings (in config.env**):**

    • SIZING_MODE=notional_pct

    • NOTIONAL_PCT_PER_TRADE=0.10 (10% of equity baseline)

    • NOTIONAL_MIN_USD=25, NOTIONAL_MAX_USD=250 (caps for $1k)

    • MAX_OPEN_POS=8, CASH_RESERVE_PCT=0.05

  • Buys: market notional orders (fractional) sized from rules above; pre-checks market hours, buying_power, trading_blocked.

  • Sells: by quantity (supports fractional), driven by the guardian.

  • Universe hygiene: only symbols that are tradable; schema guard enforces v=1 messages.

Risk controls (multiple hard stops)

  • Global kill switch: go_safe / go_arm flips LIVE_TRADING_OK (no code deploy needed).

  • Daily buy-pause: automatic when drawdown ≥ 5% (clears on recovery).

  • Position-level trailing: locks in gains, caps downside drift.

  • LIVE/DRY-RUN gates: start banner shows current mode; orders only live when gates pass.

  • Preflights: env↔endpoint sanity; creds presence; flock locks prevent dupes.

Ops & monitoring (human-friendly)

  • One-command health: health_check (alias hc2) prints:

    • Agent statuses

    • Alpaca connectivity: 200 ACTIVE tb=false bp=$…

    • Mode line: live LIVE_TRADING_OK=YES exec_probe=LIVE

    • Buy-gate: open/paused with daily DD% and reason

    • Timer status

  • Universe check: ucheck prints the active universe file & symbol list.

  • Logs: clean banners (LIVE vs DRY-RUN), guardian ARMED/PEAK/SELL breadcrumbs, error scans.

Current status (as of handoff)

  • All agents active; exec_probe in LIVE mode.

  • Alpaca ACTIVE, connectivity 200, buying_power ≈ $1,000.

  • Daily buy-gate wired and currently open (auto-pauses at −5% daily).

  • Universe anchored to your single CSV; ABB handled and won’t trade.

Why this matters

  • Capital-efficient: dollar sizing + fractional shares means high-priced leaders are accessible even to small accounts.

  • Risk-aware by design: daily portfolio drawdown brake + position-level trailing + human kill switch.

  • Operational resilience: services supervised by systemd, idempotent scripts, explicit preflights, quick health readouts.

  • Scalable: flip a few env caps and you can grow from $1k → $10k → $100k without code changes.

Roadmap (fast wins)

  • Fill → P&L ledger for daily/weekly scorecards and risk-adjusted metrics.

  • Tradability pre-filter on universe (via Assets API) each morning.

  • Backtest parity of sizing/guards for expectation setting.

  • Order router (market → limit-at-VWAP guard on volatile prints, optional).

  • Alerting (Slack/Email) when buy-gate flips or agents flap.

Tech Stack

Cloud/Host

  • AWS EC2 (x86_64) running a single Linux instance

  • OS: Ubuntu 22.04.5 LTS, kernel 6.8.0-1033-aws

  • Storage: EBS root volume ~20 GB (we saw / ~19.2 GB)

  • Init/supervision: systemd --user units & timers

Runtime / Languages

  • Python 3.10 (system Python; pandas/numpy/yfinance-style stack used by scouts)

  • Bash (ops scripts & guards), plus curl, jq, flock, lsof, sed, awk, grep

Core Services (agents)

  • scout_clean – data refresh/cleanup

  • breakout_scout – emits v=1 buy signals

  • position_guardian – trailing exits (ARM/PEAK/SELL)

  • exec_probe – gates + enqueues orders to the broker

  • account_cache.timer/service – refresh Alpaca account cache & buy-gate

Data & State

  • Signals bus: state/signals.jsonl

  • Orders queue: state/orders.todo.jsonl

  • Account cache/gate: state/account.cache.json, state/buy_gate.json

  • Universe: ~/sp600_universe/universe_master.clean.csv

Broker/Integrations

  • Alpaca Markets REST (https://api.alpaca.markets)


r/alpacamarkets • • Oct 21 '26

I gave grok bot 20K

Thumbnail gallery
0 Upvotes

r/alpacamarkets • • Aug 28 '26

What The Alpaca 🦙 Community Is Building with Agents this week

0 Upvotes

Hi everyone,

After such a positive response to the first post, we’re back with the another edition of The Alpaca 🦙 Community, where we highlight what our users are building.

This week, we’re featuring projects across:
✅ Automated stock trading systems built with AI tools and Alpaca
✅ Agentic trading infrastructure and execution control discussions
✅ Trading agents being tested using Alpaca’s paper trading environment
✅ Investment-related workflows using Alpaca’s APIs

Read more from The Alpaca 🦙 Community: https://alpaca.markets/learn/the-alpaca-community-the-trading-agents-are-here

Community projects referenced are independently developed and are shared for informational purposes. Alpaca does not endorse or recommend any particular third-party project, trading strategy, or investment.
Want us to highlight what you’re building with Alpaca? Post here or our Slack Community, or tag us on LinkedIn or X (@AlpacaHQ).

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


r/alpacamarkets • • Jun 17 '26

Education I just open-sourced my full SPY 0DTE bot — 3+ weeks of real sessions, honest P&L, and 3 new bugs that nearly broke everything

3 Upvotes

This software is for educational purposes only. It does not constitute financial advice. Paper trading performance does not guarantee live trading results. Use at your own risk.

Three weeks ago I posted a post-mortem on my SPY 0DTE gamma-explosion bot after a -$309 day exposed five failure patterns. I was holding back the strategy parameters and teasing a paid release. I changed my mind — the full code is now open source, all parameters included, no paywalls.

This post covers what happened since May 29: a volatility regime shift, three new failure modes, two fixes, and why the +$1,287 day in the table below is fake.

Original post: https://www.reddit.com/r/alpacamarkets/comments/1tsw5ej/built_a_live_0dte_spy_options_bot_on_alpaca_heres/
Full code: github.com/milgar7969/alpaca-options-framework


What changed in the market

When I wrote the original post, SPY was around $758 and the 5-day daily ATR was roughly $5. Over the following two weeks:

  • SPY dropped ~$30 into a range around $726–$750

  • The 5-day daily ATR escalated to $13–$15 — nearly 3× the regime the bot was built in

This matters because ATR is baked into strike selection. Every morning the bot computes:

offset = ATR_MULT * baseline_atr   # ATR_MULT = 0.60
call_strike = SPY + offset
put_strike  = SPY - offset

At ATR=5, offset = $3.00 — strikes about $3 OTM, well within reach on a trending day.
At ATR=15, offset = $9.00 — strikes $9 OTM. SPY would need a 1.2% move just to reach the approach zone. On most days, it doesn't.


Failure Mode 6 — Strike calibration silently breaks under high ATR ✅ Fixed

June 12 and June 15 — two consecutive trading days — both had zero trades. Not zero winners. Zero entries. The bot ran all day, processed 390 bars, detected momentum signals, and never once entered.

From the June 12 log:

09:45 startup_atr=15.43  offset=9.26  call_target=762.50  put_target=744.00
10:30 [BAR] spy_close=753.14  atr5=0.312  APPROACH ZONE: NONE  ([email protected] [email protected])

SPY spent the entire day between $751–$757. The call target was $762.50 — $9 away. No log errors. No warnings. The bot was technically working; the strike selection was just producing unreachable targets.

Fix: A hard cap on the strike offset:

MAX_STRIKE_OFFSET = 4.50
offset = min(ATR_MULT * baseline_atr, MAX_STRIKE_OFFSET)

The 5-day ATR is still used when it's low. The cap prevents elevated ATR from placing strikes beyond SPY's realized intraday range. June 16 was the first day with the cap live — 13 trades, the bot was active again.


Failure Mode 7 — Ghost position / watchdog restart cascade 🔲 Unresolved

This is the most damaging failure and still isn't fixed.

The bot has a watchdog: if silent for >20 seconds during market hours, it auto-restarts. Works fine for WebSocket drops. Under one specific EOD sequence, it produces a cascade:

  1. Time stop fires at 3:25 PM — close_position() submitted, waiting for fill

  2. MOC period is slow — fill response takes >20 seconds

  3. Watchdog fires, kills the process, restarts

  4. On startup, _recover_open_position() polls Alpaca REST for open positions

  5. Finds positions the prior instance was mid-close on — reconstructs them as "recovered"

  6. New instance holds those positions and hits the time stop again

  7. Loop continues — positions liquidated at random end-of-session prices

June 3: Two cascade exits at 3:25–3:26 PM. $224 in losses from positions the prior instance had already closed.

June 4: The same cascade produced a +$1,831.11 time_stop exit (an untracked C755 got liquidated when C755 happened to be wide at 3:25 PM), plus -$234 and -$252 from two recovered puts.

Raw P&L that day: +$1,287. Clean strategy P&L (excluding the three cascade exits): -$58.

Calling this out explicitly because the table below looks much better without the asterisks. The "recovery" mechanism that's supposed to protect against restarts is the proximate cause of the cascades. Two root causes still under investigation: (1) why the time_stop path hangs >20 seconds; (2) why _recover_open_position() finds positions that were already closed.


Failure Mode 8 — Fixed SPY stop buffer causes 52% false stops ✅ Fixed

The bot has a SPY-level stop: if SPY bar-closes more than SPY_STOP_BUFFER dollars against the position direction, it exits regardless of option price. The original value was $0.10.

After tagging 58 spy_stop exits across the June sessions: 27 of 52 (52%) saw SPY reverse within 3 bars. The stop was cutting winners, not losers. $0.10 is inside normal bar-to-bar noise when atr5 is 0.35–0.45 — the regime after the volatility shift.

Fix: ATR-adaptive buffer using the intrabar ATR already tracked by the momentum engine:

SPY_STOP_ATR_MULT = 0.75   # buffer = 0.75 × atr5 at entry time
SPY_STOP_FLOOR    = 0.10   # minimum buffer regardless of atr5

# at entry, store atr5 on the Position:
pos = Position(..., entry_spy_price=bar.close, entry_atr5=momentum_engine.state.atr5)

# on each bar close:
buf = max(config.SPY_STOP_FLOOR, config.SPY_STOP_ATR_MULT * pos.entry_atr5)

At atr5=0.20: buf = 0.15 — slightly tighter than before
At atr5=0.35: buf = 0.26 — gives the position room to breathe
At atr5=0.45: buf = 0.34 — high-velocity session, real reversals are larger moves

First day live (June 17): 2 spy_stops out of 6 trades vs. 7–11/day the prior week. Both that fired held 5 and 17 bars — actual reversals, not noise.


Full performance log

Days marked * have ghost-position cascade exits excluded from the clean column.

DateTradesRaw P&LClean P&LNotes
May 205+$64+$64
May 264-$309-$309Post-mortem session
May 2710-$159-$159First day w/ fixes, trail miscalibrated
May 295+$70+$70First full session with ATR gate + trail
Jun 14-$124-$124
Jun 22-$117-$117
Jun 3 *10-$148+$76Ghost cascade: -$224 excluded
Jun 4 *11+$1,287-$58Ghost cascade: +$1,345 excluded
Jun 518+$178+$178
Jun 815-$324-$324High ATR, elevated spy_stop rate
Jun 915+$265+$265Strong bear leg
Jun 1014-$79-$79
Jun 115-$1-$1
Jun 120$0$0← strike calibration failure
Jun 150$0$0← strike calibration failure
Jun 1613-$19-$19First day with MAX_STRIKE_OFFSET cap
Jun 176+$82+$82First day with adaptive SPY stop

Clean strategy total (May 20 – Jun 17): -$121

The raw total is +$1,007, almost entirely from the Jun 4 ghost position anomaly. -$121 is what the strategy actually produced.


What's still on the list

Three of the original five failure patterns remain unaddressed:

  • VWAP extension cap (|SPY - VWAP| ≤ $1.25)

  • Same-strike 60-minute session cooldown after a stop

  • Post-TP directional cooldown (10 bars)

One new unresolved item:

  • Ghost position / watchdog cascade at EOD


On open-sourcing

The original repo had None placeholders for all strategy parameters with a hint about a paid release. I've dropped that. The full working config is in the repo now — every threshold, multiplier, and stop level we're actually running.

The parameters alone aren't the edge. The edge (if there is one) is in understanding when the strategy fails and why — which is what these posts are for. A bot with the right numbers but no understanding of the ghost cascade bug or the regime sensitivity would still blow up.


Technical stack: Python 3.11, alpaca-py ≥ 0.43, asyncio. Three concurrent WebSocket streams (StockDataStream + OptionDataStream + TradingStream). Quote-driven exits via asyncio.create_task(_evaluate_exit()) — sub-50ms from quote arrival to order. SPY-level stop on bar close using atr5 stored at entry time. Strike offset capped at $4.50 regardless of 5-day ATR.

Full code: github.com/milgar7969/alpaca-options-framework

Still paper trading. Still logging everything. Ghost cascade is next.


r/alpacamarkets • • Aug 25 '26

Announcement $5,000 prize pool: Build an AI trading agent with Alpaca

3 Upvotes

Hey everyone!

The global online Alpaca AI Trading Agents Hackathon, co-hosted with lablab.ai, is open for registration, with a $5,000 total prize pool and 3 winners.

From August 28 to September 4, participants will build an autonomous AI trading agent using Alpaca’s Trading API and either Alpaca’s MCP Server or CLI.

Prizes:
🥇 1st: $2,500 
🥈 2nd: $1,500
🥉 3rd: $1,000
🎁 Plus 2 Social Engagement Awards

The judging criteria will be based on P&L and creativity or engagement.

Submission requirements:
1️⃣ Dedicated competition paper account (one per email)
2️⃣ Competition account starting balance set to $100,000
3️⃣ One-page write-up: AI logic, risk gates, and Alpaca infrastructure implementation
4️⃣ All strategies must include options trading

Join the Alpaca AI Trading Agents Hackathon by registering at https://lablab.ai/ai-hackathons/alpaca-ai-trading-agents-hackathon to view full terms and conditions.

Disclosures: https://alpaca.markets/disclosures


r/alpacamarkets • • Jul 14 '26

Feedback I built Coil — an AI agent that scans the S&P 500 + Nasdaq-100 every morning and trades leadership by rule (Alpaca data + Claude Code). Free daily board inside.

3 Upvotes

The Weekly Roundup nudged builders to share, so here's mine: Coil — an agentic trading system I've been building for a few months. Site + free board: https://coil.trade

What it does. Every market morning it scores ~560 names — the S&P 500, the Nasdaq-100, and a macro book — for opportunity, entry timing, and trend strength. It reads top-down: is the broad tape healthy? which sectors are in favor? and only then which names qualify. Long-only: buys market leadership when conditions support it, rotates to defense / raises cash when they don't.

The stack, since this is the Alpaca sub: the scanner and backtest spine run on Alpaca's SIP historical data (just a free Alpaca data key). Agent layer is Claude Code; execution runs against your own brokerage — your machine, your keys, live trading ships OFF until you flip it on.

Try it, free, no signup: free daily board → coil.trade/scanner · clickable demo of the real dashboard → coil.trade/demo · the full rule set in the open → coil.trade/how-it-works

The honest part — because I'd rather you trust it than be impressed. Survivorship-free backtest (2017–2026 H1, delisted names included, costs modeled): +638% vs the S&P's +282%, shallower drawdown (−23% vs −32%). But the rider matters — that edge concentrates in leadership regimes; through end-2025 it ran roughly even with SPY, just at ~a third less drawdown. Research numbers, not live; engine's newly live and I say so everywhere.

Paid side, upfront: hosted board $12/mo, full downloadable engine $29 once. But the board above is genuinely free — start there. Would love feedback on your Alpaca backtest fill/cost assumptions, and any clean source for point-in-time index membership.


r/alpacamarkets • • Dec 09 '25

Education Claude Code + Alpaca plugin for algo trading

Thumbnail reddit.com
0 Upvotes

r/alpacamarkets • • May 10 '25

Support what is wrong with my code?

0 Upvotes

i am trying to connect to my alpaca accoutn via code but i cant get it to work at all. i am very new to this so i am using ai for the code. andis there a up to date tutorial on how to make a trade bot for alpaca?

import alpaca_trade_api as tradeapi

API_KEY = ''

API_SECRET = ''

BASE_URL = 'https://paper-api.alpaca.markets/v2'

api = tradeapi.REST(API_KEY, API_SECRET, BASE_URL, api_version='v2')

try:

account = api.get_account()

print("Account successfully connected!")

print(account)

except Exception as e:

print(f"Error: {e}")


r/alpacamarkets • • May 22 '25

Someone here advised to use Alpaca Markets API for historical bars

0 Upvotes

Any ideas why am I getting 403 Forbidden?

I am passing auth as suggested in the docs

procedure TAlpaca.CreateHTTP;

begin

FHTTP := TIdHTTP.Create(NIL);

FHTTP.Request.Connection := 'close';

FHTTP.IOHandler := CreateSSLIOHandler;

FHTTP.ConnectTimeout := 10000;

FHTTP.ReadTimeout := 10000;

if not FLive then begin

FHTTP.Request.CustomHeaders.AddValue('APCA-API-KEY-ID', FSystemConfig.AlpacaKey);

FHTTP.Request.CustomHeaders.AddValue('APCA-API-SECRET-KEY', FSystemConfig.AlpacaSecret)

end

else begin

FHTTP.Request.CustomHeaders.AddValue('APCA-API-KEY-ID', FSystemConfig.AlpacaLiveKey);

FHTTP.Request.CustomHeaders.AddValue('APCA-API-SECRET-KEY', FSystemConfig.AlpacaLiveSecret);

end;

end;

vURL := 'https://data.alpaca.markets/v2/stocks/bars?symbols=' + ATicker + '&timeframe=1D';

vArray := NIL;

vList := NIL;

try

try

FHTTP.Request.ContentType := 'application/json';

FHTTP.Request.Charset := 'utf-8';

vJSON := FHTTP.Get(vURL);


r/alpacamarkets • • Jul 23 '25

Programming Help

0 Upvotes

Hey guys, I'm trying to write an ai/ machine learning program that gets real time data, learns from said data, and trades for me. I keep running into a 403 error when my code tries to run my api key and secret, any suggestions? I'm writing this using python!


r/alpacamarkets • • 10d ago

Help with my bot

Thumbnail reddit.com
0 Upvotes

r/alpacamarkets • • Oct 22 '26

Unable to Connect Alpaca Paper Trading to ChatGPT Plugins – OAuth Error

0 Upvotes

Hi everyone,

I'm trying to install and connect the Alpaca Paper Trading plugin in ChatGPT, but I keep getting the following error:

"OAuth failed: invalid_target - invalid resource"

The error appears when I click the "Install plugin" button, and I'm unable to complete the connection.

Has anyone else encountered this issue?

I'm wondering whether this is a problem with Alpaca's OAuth integration, ChatGPT's plugin system, or something related to my account settings.


r/alpacamarkets • • Oct 04 '26

Support programm to buy and sell stocks automaticly

0 Upvotes

hey everyone ive built a fully automated trading bot that can be dropped into any stock or crypto watchlist and it immediately calculates exactly when to buy and sell without needing manual configuration for each new ticker the system uses dynamic work zones based on 48h price boxes combined with adaptive atr trailing stops so it knows precisely when to enter a job zone or exit at the top im curious if there is real demand for a tool like this where users can just tweak thresholds in a simple .env file rather than dealing with complex code or black box ai systems. where would any1 be interessted in this .and if so where do you usually look for these kinds of tools github marketplaces or discord communities - alpaca


r/alpacamarkets • • Jun 04 '23

Q: How come the name "Alpaca" for a trading platform?

0 Upvotes

Oh man, I just got a thing with alpacas... even my name is similar. Let's say It's my spirit animal.

I'm looking for software dev jobs and I suddenly see Alpaca... I have nothing to do with trading but I pledge full loyalty to the company :))

Let's be serious:

How come naming the platform Alpaca?


r/alpacamarkets • • Oct 16 '26

What does composing music have to do with building a trading system?

0 Upvotes

Hey everyone,

Alpaca community member Joshua Kyan Aalampour is a classical composer and independent quantitative researcher. He approaches quantitative finance as a form of composition: choosing structures, questioning assumptions, and deciding which ideas belong together.

In a new Trader to Trader article, that approach takes shape in ORIA (Orthogonal Risk Integrated Alpha), his quantitative research system designed to combine multiple market models while accounting for overlapping risk exposure.

ORIA combines three research approaches: directional signals, shocks across related assets, and sharp ETF moves that may continue or reverse. Its risk-management framework is designed to limit shared market, sector, and style exposures, adjust allocation based on changing conditions, and apply predefined risk limits.

That same discipline carries through a workflow designed to:

✅ Use Alpaca Market Data for historical research inputs
✅ Test ideas across rolling, unseen periods
✅ Separate overlapping samples to reduce data leakage
✅ Use closing data to simulate next-open execution in Alpaca paper trading

For researchers here, when has an idea from another discipline changed how you framed a market problem? What test changed your decision to develop it, revise it, or move on?

Read the full article: https://alpaca.markets/learn/from-classical-composition-to-quantitative-finance-building-trading-strategies-through-physics-and-mathematics 

If you’d like to share what you’ve built with Alpaca, we’d love to hear from you! DM us here, share in the Subreddit, or tag us in a post on LinkedIn or X (u/AlpacaHQ).

Curious to learn more about agentic trading with Alpaca? Check out some additional resources below:

The Alpaca Team

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


r/alpacamarkets • • 19d ago

Education Day 8 of my paper-trading bot competition: a rough Monday where one stock hit most of the strategies, but Strategy 1 finished green and climbed to second

Thumbnail reddit.com
0 Upvotes